Always match emoji regardless of attributes

This commit is contained in:
Jeremy Soller 2022-10-27 08:25:30 -06:00
parent 1e1164f4b2
commit 40175aac10
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE

View file

@ -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 {