Revert unnecessary code change

This commit is contained in:
Deokjin Kim 2013-10-04 14:49:28 +09:00
parent 5d59c00575
commit 6aa9104907
4 changed files with 4 additions and 4 deletions

View file

@ -49,7 +49,7 @@ pub trait FontHandleMethods {
fn clone_with_style(&self, fctx: &FontContextHandle, style: &UsedFontStyle) fn clone_with_style(&self, fctx: &FontContextHandle, style: &UsedFontStyle)
-> Result<FontHandle, ()>; -> Result<FontHandle, ()>;
fn glyph_index(&self, codepoint: char) -> Option<GlyphIndex>; 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_metrics(&self) -> FontMetrics;
fn get_table_for_tag(&self, FontTableTag) -> Option<FontTable>; fn get_table_for_tag(&self, FontTableTag) -> Option<FontTable>;
} }

View file

@ -198,7 +198,7 @@ impl FontHandleMethods for FontHandle {
} }
#[fixed_stack_segment] #[fixed_stack_segment]
fn glyph_h_advance(&mut self, fn glyph_h_advance(&self,
glyph: GlyphIndex) -> Option<FractionalPixel> { glyph: GlyphIndex) -> Option<FractionalPixel> {
assert!(self.face.is_not_null()); assert!(self.face.is_not_null());
unsafe { unsafe {

View file

@ -198,7 +198,7 @@ impl FontHandleMethods for FontHandle {
} }
#[fixed_stack_segment] #[fixed_stack_segment]
fn glyph_h_advance(&mut self, fn glyph_h_advance(&self,
glyph: GlyphIndex) -> Option<FractionalPixel> { glyph: GlyphIndex) -> Option<FractionalPixel> {
assert!(self.face.is_not_null()); assert!(self.face.is_not_null());
unsafe { unsafe {

View file

@ -147,7 +147,7 @@ impl FontHandleMethods for FontHandle {
return Some(glyphs[0] as GlyphIndex); 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 glyphs = [glyph as CGGlyph];
let advance = self.ctfont.get_advances_for_glyphs(kCTFontDefaultOrientation, let advance = self.ctfont.get_advances_for_glyphs(kCTFontDefaultOrientation,
&glyphs[0], &glyphs[0],