[ot-font] Respect VORG even if it has no variations

This commit is contained in:
Behdad Esfahbod 2022-07-02 13:43:23 -06:00
parent 71d52e10aa
commit b07fa2bb1a
1 changed files with 4 additions and 8 deletions

View File

@ -298,19 +298,15 @@ hb_ot_get_glyph_v_origin (hb_font_t *font,
#ifndef HB_NO_VAR
const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx;
const OT::VVAR &VVAR = *vmtx.var_table;
if (font->num_coords &&
!VVAR.get_vorg_var (glyph,
font->coords, font->num_coords,
&delta))
goto out;
if (font->num_coords)
VVAR.get_vorg_var (glyph,
font->coords, font->num_coords,
&delta);
#endif
*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))