[subset-plan] Simplify name_ids allocation
This commit is contained in:
parent
cfb48f91da
commit
78aa9f1e9c
|
@ -842,7 +842,7 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
|
||||||
|
|
||||||
plan->unicode_to_new_gid_list.init ();
|
plan->unicode_to_new_gid_list.init ();
|
||||||
|
|
||||||
plan->name_ids = hb_set_copy (input->sets.name_ids);
|
plan->name_ids = *input->sets.name_ids;
|
||||||
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;
|
||||||
|
@ -952,7 +952,7 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
|
||||||
plan->glyph_map->get(plan->unicode_to_new_gid_list.arrayZ[i].second);
|
plan->glyph_map->get(plan->unicode_to_new_gid_list.arrayZ[i].second);
|
||||||
}
|
}
|
||||||
|
|
||||||
_nameid_closure (face, plan->name_ids, plan->all_axes_pinned, plan->user_axes_location);
|
_nameid_closure (face, &plan->name_ids, plan->all_axes_pinned, plan->user_axes_location);
|
||||||
if (unlikely (plan->in_error ())) {
|
if (unlikely (plan->in_error ())) {
|
||||||
hb_subset_plan_destroy (plan);
|
hb_subset_plan_destroy (plan);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -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 (name_ids);
|
|
||||||
hb_set_destroy (glyphs_requested);
|
hb_set_destroy (glyphs_requested);
|
||||||
hb_set_destroy (drop_tables);
|
hb_set_destroy (drop_tables);
|
||||||
hb_set_destroy (no_subset_tables);
|
hb_set_destroy (no_subset_tables);
|
||||||
|
@ -115,7 +114,7 @@ struct hb_subset_plan_t
|
||||||
hb_sorted_vector_t<hb_pair_t<hb_codepoint_t, hb_codepoint_t>> unicode_to_new_gid_list;
|
hb_sorted_vector_t<hb_pair_t<hb_codepoint_t, hb_codepoint_t>> unicode_to_new_gid_list;
|
||||||
|
|
||||||
// name_ids we would like to retain
|
// name_ids we would like to retain
|
||||||
hb_set_t *name_ids;
|
hb_set_t name_ids;
|
||||||
|
|
||||||
// name_languages we would like to retain
|
// name_languages we would like to retain
|
||||||
hb_set_t name_languages;
|
hb_set_t name_languages;
|
||||||
|
|
Loading…
Reference in New Issue