[ot-font] Disable VORG variation code in HB_NO_VAR

This commit is contained in:
Behdad Esfahbod 2022-06-30 14:13:44 -06:00
parent d5921b379b
commit aba4a4957a
1 changed files with 5 additions and 1 deletions

View File

@ -295,6 +295,7 @@ hb_ot_get_glyph_v_origin (hb_font_t *font,
{
float delta = 0;
#ifndef HB_NO_VAR
const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx;
const OT::VVAR &VVAR = *vmtx.var_table;
if (font->num_coords &&
@ -302,11 +303,14 @@ hb_ot_get_glyph_v_origin (hb_font_t *font,
font->coords, font->num_coords,
&delta))
goto out;
#endif
*y = font->em_scale_y (VORG.get_y_origin (glyph) + delta);
*y = font->em_scalef_y (VORG.get_y_origin (glyph) + delta);
return true;
}
#ifndef HB_NO_VAR
out:
#endif
hb_glyph_extents_t extents = {0};
if (ot_face->glyf->get_extents (font, glyph, &extents))