diff --git a/src/attrs.rs b/src/attrs.rs index 4e8bf01..37ad31f 100644 --- a/src/attrs.rs +++ b/src/attrs.rs @@ -74,11 +74,14 @@ impl<'a> Attrs<'a> { } pub fn matches(&self, face: &fontdb::FaceInfo) -> bool { - face.style == self.style && - face.weight == self.weight && - face.stretch == self.stretch && //TODO: smarter way of including emoji - (face.monospaced == self.monospaced || face.post_script_name.contains("Emoji")) + face.post_script_name.contains("Emoji") || + ( + face.style == self.style && + face.weight == self.weight && + face.stretch == self.stretch && + face.monospaced == self.monospaced + ) } pub fn compatible(&self, other: &Self) -> bool {