aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/gfx/font.rs2
-rw-r--r--src/components/gfx/platform/android/font.rs2
-rw-r--r--src/components/gfx/platform/linux/font.rs2
-rw-r--r--src/components/gfx/platform/macos/font.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/components/gfx/font.rs b/src/components/gfx/font.rs
index 9278cc11041..994ee0d91de 100644
--- a/src/components/gfx/font.rs
+++ b/src/components/gfx/font.rs
@@ -49,7 +49,7 @@ pub trait FontHandleMethods {
fn clone_with_style(&self, fctx: &FontContextHandle, style: &UsedFontStyle)
-> Result<FontHandle, ()>;
fn glyph_index(&self, codepoint: char) -> Option<GlyphIndex>;
- fn glyph_h_advance(&mut self, GlyphIndex) -> Option<FractionalPixel>;
+ fn glyph_h_advance(&self, GlyphIndex) -> Option<FractionalPixel>;
fn get_metrics(&self) -> FontMetrics;
fn get_table_for_tag(&self, FontTableTag) -> Option<FontTable>;
}
diff --git a/src/components/gfx/platform/android/font.rs b/src/components/gfx/platform/android/font.rs
index a9e20379757..b8b08cc9599 100644
--- a/src/components/gfx/platform/android/font.rs
+++ b/src/components/gfx/platform/android/font.rs
@@ -198,7 +198,7 @@ impl FontHandleMethods for FontHandle {
}
#[fixed_stack_segment]
- fn glyph_h_advance(&mut self,
+ fn glyph_h_advance(&self,
glyph: GlyphIndex) -> Option<FractionalPixel> {
assert!(self.face.is_not_null());
unsafe {
diff --git a/src/components/gfx/platform/linux/font.rs b/src/components/gfx/platform/linux/font.rs
index a9e20379757..b8b08cc9599 100644
--- a/src/components/gfx/platform/linux/font.rs
+++ b/src/components/gfx/platform/linux/font.rs
@@ -198,7 +198,7 @@ impl FontHandleMethods for FontHandle {
}
#[fixed_stack_segment]
- fn glyph_h_advance(&mut self,
+ fn glyph_h_advance(&self,
glyph: GlyphIndex) -> Option<FractionalPixel> {
assert!(self.face.is_not_null());
unsafe {
diff --git a/src/components/gfx/platform/macos/font.rs b/src/components/gfx/platform/macos/font.rs
index f38d7600bb9..08978c5d063 100644
--- a/src/components/gfx/platform/macos/font.rs
+++ b/src/components/gfx/platform/macos/font.rs
@@ -147,7 +147,7 @@ impl FontHandleMethods for FontHandle {
return Some(glyphs[0] as GlyphIndex);
}
- fn glyph_h_advance(&mut self, glyph: GlyphIndex) -> Option<FractionalPixel> {
+ fn glyph_h_advance(&self, glyph: GlyphIndex) -> Option<FractionalPixel> {
let glyphs = [glyph as CGGlyph];
let advance = self.ctfont.get_advances_for_glyphs(kCTFontDefaultOrientation,
&glyphs[0],