[subset/cff1] Speed up plan_subset_charset

25% speedup in --benchmark_filter=subset_glyphs/SourceSansPro'.*retaingids/10
This commit is contained in:
Behdad Esfahbod 2023-06-06 15:38:14 -06:00
parent fd13aa9eff
commit 9e80f6b1b6

View file

@ -501,6 +501,8 @@ struct cff_subset_plan {
if (it->first == 0) it++;
auto _ = *it;
bool not_is_cid = !acc.is_CID ();
if (not_is_cid)
sidmap.resize (num_glyphs);
for (glyph = 1; glyph < num_glyphs; glyph++)
{
hb_codepoint_t old_glyph;