[GDEF] Use bit-set instead of set-digest for mark glyph classes

Most fonts don't even have these. Some, like NotoSansDuployan
have huge ones. This speeds it up by 25%.
This commit is contained in:
Behdad Esfahbod committed 2025-07-25 04:00:37 -06:00
1 parent cb4cc445a2
commit 786f8381bd
1 file changed
+5 -3
+5 -3
View File
@@ -1006,14 +1006,16 @@ struct GDEF
{
return
#ifndef HB_NO_GDEF_CACHE
mark_glyph_set_digests[set_index].may_have (glyph_id) &&
mark_glyph_set_digests[set_index].may_have (glyph_id)
#else
table->mark_set_covers (set_index, glyph_id)
#endif
table->mark_set_covers (set_index, glyph_id);
;
}
hb_blob_ptr_t<GDEF> table;
#ifndef HB_NO_GDEF_CACHE
hb_vector_t<hb_set_digest_t> mark_glyph_set_digests;
hb_vector_t<hb_bit_set_t> mark_glyph_set_digests;
mutable hb_cache_t<21, 3> glyph_props_cache;
static_assert (sizeof (glyph_props_cache) == 512, "");
#endif