[subset-plan] Simplify glyph_map_gsub allocation
This commit is contained in:
parent
bd4b040e7f
commit
b2007abff7
|
@ -1532,7 +1532,7 @@ struct ClassDefFormat1_3
|
|||
const Coverage* glyph_filter = nullptr) const
|
||||
{
|
||||
TRACE_SUBSET (this);
|
||||
const hb_map_t &glyph_map = *c->plan->glyph_map_gsub;
|
||||
const hb_map_t &glyph_map = c->plan->glyph_map_gsub;
|
||||
|
||||
hb_sorted_vector_t<hb_pair_t<hb_codepoint_t, hb_codepoint_t>> glyph_and_klass;
|
||||
hb_set_t orig_klasses;
|
||||
|
@ -1777,7 +1777,7 @@ struct ClassDefFormat2_4
|
|||
const Coverage* glyph_filter = nullptr) const
|
||||
{
|
||||
TRACE_SUBSET (this);
|
||||
const hb_map_t &glyph_map = *c->plan->glyph_map_gsub;
|
||||
const hb_map_t &glyph_map = c->plan->glyph_map_gsub;
|
||||
const hb_set_t &glyph_set = *c->plan->glyphset_gsub ();
|
||||
|
||||
hb_sorted_vector_t<hb_pair_t<hb_codepoint_t, hb_codepoint_t>> glyph_and_klass;
|
||||
|
|
|
@ -855,7 +855,6 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
|
|||
plan->codepoint_to_glyph = hb_map_create ();
|
||||
plan->glyph_map = hb_map_create ();
|
||||
plan->reverse_glyph_map = hb_map_create ();
|
||||
plan->glyph_map_gsub = hb_map_create ();
|
||||
|
||||
plan->gdef_varstore_inner_maps.init ();
|
||||
|
||||
|
@ -920,7 +919,7 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
|
|||
_create_glyph_map_gsub (
|
||||
&plan->_glyphset_gsub,
|
||||
plan->glyph_map,
|
||||
plan->glyph_map_gsub);
|
||||
&plan->glyph_map_gsub);
|
||||
|
||||
// Now that we have old to new gid map update the unicode to new gid list.
|
||||
for (unsigned i = 0; i < plan->unicode_to_new_gid_list.length; i++)
|
||||
|
|
|
@ -54,7 +54,6 @@ struct hb_subset_plan_t
|
|||
hb_map_destroy (codepoint_to_glyph);
|
||||
hb_map_destroy (glyph_map);
|
||||
hb_map_destroy (reverse_glyph_map);
|
||||
hb_map_destroy (glyph_map_gsub);
|
||||
hb_map_destroy (axes_index_map);
|
||||
hb_map_destroy (axes_old_index_tag_map);
|
||||
|
||||
|
@ -119,7 +118,7 @@ struct hb_subset_plan_t
|
|||
// Old -> New glyph id mapping
|
||||
hb_map_t *glyph_map;
|
||||
hb_map_t *reverse_glyph_map;
|
||||
hb_map_t *glyph_map_gsub;
|
||||
hb_map_t glyph_map_gsub;
|
||||
|
||||
// Plan is only good for a specific source/dest so keep them with it
|
||||
hb_face_t *source;
|
||||
|
|
Loading…
Reference in New Issue