Always match emoji regardless of attributes
This commit is contained in:
parent
1e1164f4b2
commit
40175aac10
1 changed files with 7 additions and 4 deletions
11
src/attrs.rs
11
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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue