[subset/glyf] Close over VarComposite glyphs

Subsetting VarComposite glyphs works now.
This commit is contained in:
Behdad Esfahbod 2023-04-20 17:44:59 -06:00
parent f2d21425a3
commit 106a237e40
1 changed files with 13 additions and 1 deletions

View File

@ -623,7 +623,7 @@ _glyf_add_gid_and_children (const OT::glyf_accelerator_t &glyf,
gids_to_retain->add (gid);
for (auto item : glyf.glyph_for_gid (gid).get_composite_iterator ())
for (auto &item : glyf.glyph_for_gid (gid).get_composite_iterator ())
operation_count =
_glyf_add_gid_and_children (glyf,
item.get_gid (),
@ -631,6 +631,18 @@ _glyf_add_gid_and_children (const OT::glyf_accelerator_t &glyf,
operation_count,
depth);
#ifndef HB_NO_VAR_COMPOSITES
for (auto &item : glyf.glyph_for_gid (gid).get_var_composite_iterator ())
{
operation_count =
_glyf_add_gid_and_children (glyf,
item.get_gid (),
gids_to_retain,
operation_count,
depth);
}
#endif
return operation_count;
}