[gvar] Return gracefully even if coords_count != gvar's axis count

It shouldn't be that common to have the situation, even so, no need to
reject entire a glyph even if gvar isn't used.
This commit is contained in:
Ebrahim Byagowi 2020-02-24 08:46:08 +03:30
parent 5f23a76e99
commit 346ab9884b
1 changed files with 1 additions and 2 deletions

View File

@ -563,8 +563,7 @@ struct gvar
const int *coords, unsigned int coord_count,
const hb_array_t<contour_point_t> points) const
{
if (!coord_count) return true;
if (unlikely (coord_count != gvar_table->axisCount)) return false;
if (!coord_count || coord_count != gvar_table->axisCount) return true;
const GlyphVarData *var_data = gvar_table->get_glyph_var_data (glyph);
if (var_data == &Null (GlyphVarData)) return true;