mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Use last resort font when only there is no font in font group.
There is a little bit of performance gain of layout.
This commit is contained in:
parent
91fcc6703b
commit
a5db5d5eeb
1 changed files with 15 additions and 13 deletions
|
@ -154,6 +154,7 @@ impl<'self> FontContext {
|
|||
}
|
||||
}
|
||||
|
||||
if fonts.len() == 0 {
|
||||
let last_resort = FontList::get_last_resort_font_families();
|
||||
|
||||
for family in last_resort.iter() {
|
||||
|
@ -174,6 +175,7 @@ impl<'self> FontContext {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert!(fonts.len() > 0);
|
||||
// TODO(Issue #179): Split FontStyle into specified and used styles
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue