Merge pull request #1341 from deokjinkim/layout_font_optimize

Use last resort font when only there is no font in font group.
This commit is contained in:
Lars Bergstrom 2013-12-06 04:54:32 -08:00
commit 24e21bcc28

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