Disable non-OpenType kerning with hb-ft in HB_TINY
authorBehdad Esfahbod <behdad@behdad.org>
Mon, 17 Jun 2019 21:06:04 +0000 (14:06 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 17 Jun 2019 21:06:04 +0000 (14:06 -0700)
src/hb-ft.cc

index c24a0e2..d40e8fa 100644 (file)
@@ -346,6 +346,7 @@ hb_ft_get_glyph_v_origin (hb_font_t *font,
   return true;
 }
 
+#ifndef HB_NO_OT_SHAPE_FALLBACK
 static hb_position_t
 hb_ft_get_glyph_h_kerning (hb_font_t *font,
                           void *font_data,
@@ -362,6 +363,7 @@ hb_ft_get_glyph_h_kerning (hb_font_t *font,
 
   return kerningv.x;
 }
+#endif
 
 static hb_bool_t
 hb_ft_get_glyph_extents (hb_font_t *font,
@@ -514,7 +516,9 @@ static struct hb_ft_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ft
     hb_font_funcs_set_glyph_v_advance_func (funcs, hb_ft_get_glyph_v_advance, nullptr, nullptr);
     //hb_font_funcs_set_glyph_h_origin_func (funcs, hb_ft_get_glyph_h_origin, nullptr, nullptr);
     hb_font_funcs_set_glyph_v_origin_func (funcs, hb_ft_get_glyph_v_origin, nullptr, nullptr);
+#ifndef HB_NO_OT_SHAPE_FALLBACK
     hb_font_funcs_set_glyph_h_kerning_func (funcs, hb_ft_get_glyph_h_kerning, nullptr, nullptr);
+#endif
     //hb_font_funcs_set_glyph_v_kerning_func (funcs, hb_ft_get_glyph_v_kerning, nullptr, nullptr);
     hb_font_funcs_set_glyph_extents_func (funcs, hb_ft_get_glyph_extents, nullptr, nullptr);
     hb_font_funcs_set_glyph_contour_point_func (funcs, hb_ft_get_glyph_contour_point, nullptr, nullptr);