[subset/cff1] Speed up for retaingids

pull/4264/head
Behdad Esfahbod 1 year ago
parent fa8d15d520
commit dff3a936d2
  1. 11
      src/hb-subset-cff1.cc

@ -487,10 +487,17 @@ struct cff_subset_plan {
unsigned int glyph;
unsigned num_glyphs = plan->num_output_glyphs ();
auto it = hb_iter (plan->new_to_old_gid_list);
if (it->first == 0) it++;
for (glyph = 1; glyph < num_glyphs; glyph++)
{
hb_codepoint_t old_glyph;
if (!plan->old_gid_for_new_gid (glyph, &old_glyph))
hb_codepoint_t old_glyph;
if (glyph == it->first)
{
old_glyph = it->second;
it++;
}
else
{
/* Retain the SID for the old missing glyph ID */
old_glyph = glyph;

Loading…
Cancel
Save