[COLR] Return false from get_extents if table version not 1

This commit is contained in:
Behdad Esfahbod 2022-12-11 13:13:35 -07:00
parent b3d6a5ef86
commit d0ee5a452f
1 changed files with 2 additions and 0 deletions

View File

@ -1547,6 +1547,8 @@ struct COLR
bool
get_extents (hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents) const
{
if (version != 1)
return false;
if ((this+clipList).get_extents (glyph, extents))
{
extents->x_bearing = font->em_scale_x (extents->x_bearing);