[shape-plan] Simplify glyphs_requested allocation

This commit is contained in:
Behdad Esfahbod 2023-01-11 11:23:48 -07:00
parent c51d33685d
commit bd4b040e7f
3 changed files with 3 additions and 4 deletions

View File

@ -1414,7 +1414,7 @@ struct CmapSubtable
switch (format) { switch (format) {
case 4: return u.format4.serialize (c, it); case 4: return u.format4.serialize (c, it);
case 12: return u.format12.serialize (c, it); case 12: return u.format12.serialize (c, it);
case 14: return u.format14.serialize (c, plan->unicodes, plan->glyphs_requested, plan->glyph_map, base); case 14: return u.format14.serialize (c, plan->unicodes, &plan->glyphs_requested, plan->glyph_map, base);
default: return; default: return;
} }
} }

View File

@ -846,7 +846,7 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
plan->name_languages = *input->sets.name_languages; plan->name_languages = *input->sets.name_languages;
plan->layout_features = *input->sets.layout_features; plan->layout_features = *input->sets.layout_features;
plan->layout_scripts = *input->sets.layout_scripts; plan->layout_scripts = *input->sets.layout_scripts;
plan->glyphs_requested = hb_set_copy (input->sets.glyphs); plan->glyphs_requested = *input->sets.glyphs;
plan->drop_tables = *input->sets.drop_tables; plan->drop_tables = *input->sets.drop_tables;
plan->no_subset_tables = *input->sets.no_subset_tables; plan->no_subset_tables = *input->sets.no_subset_tables;
plan->source = hb_face_reference (face); plan->source = hb_face_reference (face);

View File

@ -49,7 +49,6 @@ struct hb_subset_plan_t
~hb_subset_plan_t() ~hb_subset_plan_t()
{ {
hb_set_destroy (unicodes); hb_set_destroy (unicodes);
hb_set_destroy (glyphs_requested);
hb_face_destroy (source); hb_face_destroy (source);
hb_face_destroy (dest); hb_face_destroy (dest);
hb_map_destroy (codepoint_to_glyph); hb_map_destroy (codepoint_to_glyph);
@ -106,7 +105,7 @@ struct hb_subset_plan_t
hb_set_t layout_scripts; hb_set_t layout_scripts;
//glyph ids requested to retain //glyph ids requested to retain
hb_set_t *glyphs_requested; hb_set_t glyphs_requested;
// Tables which should not be processed, just pass them through. // Tables which should not be processed, just pass them through.
hb_set_t no_subset_tables; hb_set_t no_subset_tables;