diff --git a/components/gfx/font.rs b/components/gfx/font.rs index 926b824271f..1abfe692cc0 100644 --- a/components/gfx/font.rs +++ b/components/gfx/font.rs @@ -16,7 +16,6 @@ use std::str; use std::sync::Arc; use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering}; use style::computed_values::{font_stretch, font_variant, font_weight}; -use style::properties::style_structs::ServoFont; use text::Shaper; use text::glyph::{GlyphId, GlyphStore}; use text::shaping::ShaperMethods; @@ -88,8 +87,6 @@ pub struct FontMetrics { pub line_gap: Au, } -pub type SpecifiedFontStyle = ServoFont; - #[derive(Debug)] pub struct Font { pub handle: FontHandle, diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs index ff7715e2cb7..184b0924961 100644 --- a/components/gfx/font_context.rs +++ b/components/gfx/font_context.rs @@ -8,9 +8,7 @@ use azure::azure_hl::BackendType; use azure::scaled_font::FontInfo; use azure::scaled_font::ScaledFont; use fnv::FnvHasher; -use font::FontHandleMethods; -use font::SpecifiedFontStyle; -use font::{Font, FontGroup}; +use font::{Font, FontGroup, FontHandleMethods}; use font_cache_thread::FontCacheThread; use font_template::FontTemplateDescriptor; use heapsize::HeapSizeOf; @@ -27,6 +25,7 @@ use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; use string_cache::Atom; use style::computed_values::{font_style, font_variant}; +use style::properties::style_structs::ServoFont; use util::cache::HashCache; use webrender_traits; @@ -158,7 +157,7 @@ impl FontContext { /// Create a group of fonts for use in layout calculations. May return /// a cached font if this font instance has already been used by /// this context. - pub fn layout_font_group_for_style(&mut self, style: Arc) + pub fn layout_font_group_for_style(&mut self, style: Arc) -> Rc { self.expire_font_caches_if_necessary(); @@ -317,7 +316,7 @@ impl HeapSizeOf for FontContext { #[derive(Debug)] struct LayoutFontGroupCacheKey { - pointer: Arc, + pointer: Arc, size: Au, }