aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'components/gfx')
-rw-r--r--components/gfx/font_cache_thread.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/components/gfx/font_cache_thread.rs b/components/gfx/font_cache_thread.rs
index 45eead2357d..21771b151da 100644
--- a/components/gfx/font_cache_thread.rs
+++ b/components/gfx/font_cache_thread.rs
@@ -182,10 +182,13 @@ impl FontCache {
Command::GetFontInstance(font_key, size, result) => {
let webrender_api = &self.webrender_api;
- let instance_key = *self
- .font_instances
- .entry((font_key, size))
- .or_insert_with(|| webrender_api.add_font_instance(font_key, size));
+ let instance_key =
+ *self
+ .font_instances
+ .entry((font_key, size))
+ .or_insert_with(|| {
+ webrender_api.add_font_instance(font_key, size.to_f32_px())
+ });
let _ = result.send(instance_key);
},