src/hb-ft.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 2023e2b54d91924dddfd228ffdbb46021135b068 Author: Behdad Esfahbod <[email protected]> Date: Wed Jul 11 19:00:30 2012 -0400 [ft] Disable ppem setting The calculations were wrong. FreeType makes it really hard to set size and ppem independently. For now, disable it. Need to come up with a fix later. diff --git a/src/hb-ft.cc b/src/hb-ft.cc index 17c68df..90937ca 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -466,8 +466,11 @@ hb_ft_font_set_funcs (hb_font_t *font) FT_Set_Char_Size (ft_face, font->x_scale, font->y_scale, + 0, 0); +#if 0 font->x_ppem * 72 * 64 / font->x_scale, font->y_ppem * 72 * 64 / font->y_scale); +#endif ft_face->generic.data = blob; ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob; commit cdf7444505a7ae49d20f9ba6776dea92c1fde2a6 Author: Behdad Esfahbod <[email protected]> Date: Wed Jul 11 18:52:39 2012 -0400 [ft] Use unfitted kerning if x_ppem is zero diff --git a/src/hb-ft.cc b/src/hb-ft.cc index 0589c9e..17c68df 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -158,7 +158,7 @@ hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED, } static hb_position_t -hb_ft_get_glyph_h_kerning (hb_font_t *font HB_UNUSED, +hb_ft_get_glyph_h_kerning (hb_font_t *font, void *font_data, hb_codepoint_t left_glyph, hb_codepoint_t right_glyph, @@ -167,7 +167,8 @@ hb_ft_get_glyph_h_kerning (hb_font_t *font HB_UNUSED, FT_Face ft_face = (FT_Face) font_data; FT_Vector kerningv; - if (FT_Get_Kerning (ft_face, left_glyph, right_glyph, FT_KERNING_DEFAULT, &kerningv)) + FT_Kerning_Mode mode = font->x_ppem ? FT_KERNING_DEFAULT : FT_KERNING_UNFITTED; + if (FT_Get_Kerning (ft_face, left_glyph, right_glyph, mode, &kerningv)) return 0; return kerningv.x; _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
