[subset] Presize unicode to gid list to unicodes + glyphs size.
This commit is contained in:
parent
7c7c01d28c
commit
42c54eba83
|
@ -326,7 +326,8 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
|
||||||
// them with cmap entries.
|
// them with cmap entries.
|
||||||
hb_map_t unicode_glyphid_map;
|
hb_map_t unicode_glyphid_map;
|
||||||
cmap.collect_mapping (hb_set_get_empty (), &unicode_glyphid_map);
|
cmap.collect_mapping (hb_set_get_empty (), &unicode_glyphid_map);
|
||||||
plan->unicode_to_new_gid_list.alloc (unicode_glyphid_map.get_population ());
|
plan->unicode_to_new_gid_list.alloc (unicodes->get_population ()
|
||||||
|
+ glyphs->get_population ());
|
||||||
|
|
||||||
for (hb_pair_t<hb_codepoint_t, hb_codepoint_t> cp_gid :
|
for (hb_pair_t<hb_codepoint_t, hb_codepoint_t> cp_gid :
|
||||||
+ unicode_glyphid_map.iter ())
|
+ unicode_glyphid_map.iter ())
|
||||||
|
|
Loading…
Reference in New Issue