diff --git a/src/OT/Var/VARC/VARC.hh b/src/OT/Var/VARC/VARC.hh index f95a6fe9d..31e280546 100644 --- a/src/OT/Var/VARC/VARC.hh +++ b/src/OT/Var/VARC/VARC.hh @@ -128,9 +128,12 @@ struct VARC return true; visited->add (glyph); - VarRegionList::cache_t *cache = (this+varStore).create_cache (); - hb_ubytes_t record = (this+glyphRecords)[idx]; + + VarRegionList::cache_t *cache = record.length >= 64 ? // Heuristic + (this+varStore).create_cache () + : nullptr; + VarCompositeGlyph::get_path_at (font, glyph, draw_session, coords, record,