Update fontdb dependency to version 0.13
This commit is contained in:
parent
4ac5e1c6a6
commit
2c1d564d62
6 changed files with 24 additions and 11 deletions
|
|
@ -44,6 +44,18 @@ impl<'a> Font<'a> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn name(&self) -> &str {
|
||||
if let Some((name, _)) = self.info.families.first() {
|
||||
name
|
||||
} else {
|
||||
&self.info.post_script_name
|
||||
}
|
||||
}
|
||||
|
||||
pub fn contains_family(&self, family: &str) -> bool {
|
||||
self.info.families.iter().any(|(name, _)| name == family)
|
||||
}
|
||||
|
||||
#[cfg(feature = "swash")]
|
||||
pub fn as_swash(&self) -> swash::FontRef {
|
||||
swash::FontRef {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue