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:
bors-servo 2016-07-06 10:16:23 -07:00 committed by GitHub
commit 3679b0a328

View file

@ -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();
}
}
}
}