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:
Deokjin Kim 2013-12-06 16:50:25 +09:00
parent 91fcc6703b
commit a5db5d5eeb

View file

@ -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