aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/font.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/gfx/font.rs')
-rw-r--r--components/gfx/font.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/components/gfx/font.rs b/components/gfx/font.rs
index 52c3f95c53a..258a1782d28 100644
--- a/components/gfx/font.rs
+++ b/components/gfx/font.rs
@@ -19,7 +19,7 @@ use platform::font::{FontHandle, FontTable};
use util::geometry::Au;
use text::glyph::{GlyphStore, GlyphId};
use text::shaping::ShaperMethods;
-use text::{Shaper, TextRun};
+use text::Shaper;
use font_template::FontTemplateDescriptor;
use platform::font_template::FontTemplateData;
@@ -183,6 +183,7 @@ impl Font {
return result;
}
+ #[inline]
pub fn glyph_index(&self, codepoint: char) -> Option<GlyphId> {
let codepoint = match self.variant {
font_variant::T::small_caps => codepoint.to_uppercase().next().unwrap(), //FIXME: #5938
@@ -217,14 +218,6 @@ impl FontGroup {
fonts: fonts,
}
}
-
- pub fn create_textrun(&self, text: String, options: &ShapingOptions) -> TextRun {
- assert!(self.fonts.len() > 0);
-
- // TODO(Issue #177): Actually fall back through the FontGroup when a font is unsuitable.
- let mut font_borrow = self.fonts[0].borrow_mut();
- TextRun::new(&mut *font_borrow, text.clone(), options)
- }
}
pub struct RunMetrics {