Format
This commit is contained in:
parent
329941c4a6
commit
a11f68f13d
6 changed files with 66 additions and 26 deletions
|
|
@ -120,7 +120,10 @@ impl FontSystem {
|
|||
match Font::new(&self.db, id) {
|
||||
Some(font) => Some(Arc::new(font)),
|
||||
None => {
|
||||
log::warn!("failed to load font '{}'", self.db.face(id)?.post_script_name);
|
||||
log::warn!(
|
||||
"failed to load font '{}'",
|
||||
self.db.face(id)?.post_script_name
|
||||
);
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
@ -140,7 +143,10 @@ impl FontSystem {
|
|||
.db
|
||||
.faces()
|
||||
.filter(|face| attrs.matches(face))
|
||||
.map(|face| FontMatchKey{ weight_offset: attrs.weight.0 - face.weight.0, id: face.id })
|
||||
.map(|face| FontMatchKey {
|
||||
weight_offset: attrs.weight.0 - face.weight.0,
|
||||
id: face.id,
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
// Sort so we get the keys with weight_offset=0 first
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue