[gvar] Don't fail on imprefect gvar

No need to fail even if gvar doesn't have that much glyphs
This commit is contained in:
Ebrahim Byagowi 2020-08-06 22:18:35 +04:30 committed by GitHub
parent ec17b62457
commit 02d1ec1658
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -540,7 +540,7 @@ struct gvar
/* num_coords should exactly match gvar's axisCount due to how GlyphVariationData tuples are aligned */
if (!font->num_coords || font->num_coords != table->axisCount) return true;
if (unlikely (glyph >= table->glyphCount)) return false;
if (unlikely (glyph >= table->glyphCount)) return true;
hb_bytes_t var_data_bytes = table->get_glyph_var_data_bytes (table.get_blob (), glyph);
if (!var_data_bytes.as<GlyphVariationData> ()->has_data ()) return true;