aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/font_cache_thread.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-07-04 09:52:36 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-07-04 09:52:36 +0200
commit74a4d76bb1c62e3121ec6593c2621bc561d19a05 (patch)
tree93410d499453a8acaa0404ac3bb8d3483847a508 /components/gfx/font_cache_thread.rs
parent110fd6861007544b4f5b15d49da4f297c200bd7c (diff)
downloadservo-74a4d76bb1c62e3121ec6593c2621bc561d19a05.tar.gz
servo-74a4d76bb1c62e3121ec6593c2621bc561d19a05.zip
Continue loading font-face sources on missing local font
Diffstat (limited to 'components/gfx/font_cache_thread.rs')
-rw-r--r--components/gfx/font_cache_thread.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/components/gfx/font_cache_thread.rs b/components/gfx/font_cache_thread.rs
index 9a88cce953b..56db1a2fff0 100644
--- a/components/gfx/font_cache_thread.rs
+++ b/components/gfx/font_cache_thread.rs
@@ -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();
+ }
}
}
}