From c3170ac865c58925c5d1a656c790449e92ab503a Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 12 Oct 2012 00:29:11 -0700 Subject: [PATCH] Correct fixed point conversion in ft_native_font --- src/servo/text/native_font/ft_native_font.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/servo/text/native_font/ft_native_font.rs b/src/servo/text/native_font/ft_native_font.rs index ba40ba5e556..63ef63dfd1e 100644 --- a/src/servo/text/native_font/ft_native_font.rs +++ b/src/servo/text/native_font/ft_native_font.rs @@ -22,11 +22,11 @@ use freetype::bindgen::{ }; fn float_to_fixed_ft(f: float) -> i32 { - float_to_fixed(26, f) + float_to_fixed(6, f) } fn fixed_to_float_ft(f: i32) -> float { - fixed_to_float(26, f) + fixed_to_float(6, f) } struct FreeTypeNativeFont { @@ -69,6 +69,7 @@ impl FreeTypeNativeFont { let void_glyph = (*self.face).glyph; let slot: FT_GlyphSlot = reinterpret_cast(&void_glyph); assert slot.is_not_null(); + debug!("metrics: %?", (*slot).metrics); let advance = (*slot).metrics.horiAdvance; debug!("h_advance for %? is %?", glyph, advance); let advance = advance as i32;