Allow fallback to fonts with mismatched stretch or style
This commit is contained in:
parent
cfb7224370
commit
e9075aeae8
2 changed files with 37 additions and 19 deletions
|
|
@ -319,13 +319,6 @@ impl<'a> Attrs<'a> {
|
|||
self
|
||||
}
|
||||
|
||||
/// Check if font matches
|
||||
pub fn matches(&self, face: &fontdb::FaceInfo) -> bool {
|
||||
//TODO: smarter way of including emoji
|
||||
face.post_script_name.contains("Emoji")
|
||||
|| (face.style == self.style && face.stretch == self.stretch)
|
||||
}
|
||||
|
||||
/// Check if this set of attributes can be shaped with another
|
||||
pub fn compatible(&self, other: &Self) -> bool {
|
||||
self.family == other.family
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue