From 002a1f70b81d56b882bd5a68ebdc22c015e88f7f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 Dec 2021 10:45:30 -0800 Subject: [PATCH] [ft] Disable vertical funcs if HB_NO_VERTICAL --- src/hb-ft.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index 97a2c82e6..67691e3ff 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -361,6 +361,7 @@ hb_ft_get_glyph_h_advances (hb_font_t* font, void* font_data, } } +#ifndef HB_NO_VERTICAL static hb_position_t hb_ft_get_glyph_v_advance (hb_font_t *font, void *font_data, @@ -381,7 +382,9 @@ hb_ft_get_glyph_v_advance (hb_font_t *font, * have a Y growing upward. Hence the extra negation. */ return (-v + (1<<9)) >> 10; } +#endif +#ifndef HB_NO_VERTICAL static hb_bool_t hb_ft_get_glyph_v_origin (hb_font_t *font, void *font_data, @@ -409,6 +412,7 @@ hb_ft_get_glyph_v_origin (hb_font_t *font, return true; } +#endif #ifndef HB_NO_OT_SHAPE_FALLBACK static hb_position_t @@ -569,15 +573,20 @@ static struct hb_ft_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t