mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #12208 - nox:fontloading, r=metajack
Continue loading font-face sources on missing local font <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12208) <!-- Reviewable:end -->
This commit is contained in:
commit
3679b0a328
1 changed files with 8 additions and 1 deletions
|
@ -268,10 +268,17 @@ impl FontCache {
|
|||
Source::Local(ref font) => {
|
||||
let font_face_name = LowercaseString::new(font.name());
|
||||
let templates = &mut self.web_families.get_mut(&family_name).unwrap();
|
||||
let mut found = false;
|
||||
for_each_variation(&font_face_name, |path| {
|
||||
found = true;
|
||||
templates.add_template(Atom::from(&*path), None);
|
||||
});
|
||||
sender.send(()).unwrap();
|
||||
if found {
|
||||
sender.send(()).unwrap();
|
||||
} else {
|
||||
let msg = Command::AddWebFont(family_name, sources, sender);
|
||||
self.channel_to_self.send(msg).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue