[subset-plan] Simplify gsub_features and gpos_features allocation
This commit is contained in:
parent
78aa9f1e9c
commit
1a716bad03
|
@ -158,7 +158,7 @@ struct hb_subset_layout_context_t :
|
||||||
{
|
{
|
||||||
lookup_index_map = c_->plan->gsub_lookups;
|
lookup_index_map = c_->plan->gsub_lookups;
|
||||||
script_langsys_map = c_->plan->gsub_langsys;
|
script_langsys_map = c_->plan->gsub_langsys;
|
||||||
feature_index_map = c_->plan->gsub_features;
|
feature_index_map = &c_->plan->gsub_features;
|
||||||
feature_substitutes_map = c_->plan->gsub_feature_substitutes_map;
|
feature_substitutes_map = c_->plan->gsub_feature_substitutes_map;
|
||||||
feature_record_cond_idx_map = c_->plan->user_axes_location->is_empty () ? nullptr : c_->plan->gsub_feature_record_cond_idx_map;
|
feature_record_cond_idx_map = c_->plan->user_axes_location->is_empty () ? nullptr : c_->plan->gsub_feature_record_cond_idx_map;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ struct hb_subset_layout_context_t :
|
||||||
{
|
{
|
||||||
lookup_index_map = c_->plan->gpos_lookups;
|
lookup_index_map = c_->plan->gpos_lookups;
|
||||||
script_langsys_map = c_->plan->gpos_langsys;
|
script_langsys_map = c_->plan->gpos_langsys;
|
||||||
feature_index_map = c_->plan->gpos_features;
|
feature_index_map = &c_->plan->gpos_features;
|
||||||
feature_substitutes_map = c_->plan->gpos_feature_substitutes_map;
|
feature_substitutes_map = c_->plan->gpos_feature_substitutes_map;
|
||||||
feature_record_cond_idx_map = c_->plan->user_axes_location->is_empty () ? nullptr : c_->plan->gpos_feature_record_cond_idx_map;
|
feature_record_cond_idx_map = c_->plan->user_axes_location->is_empty () ? nullptr : c_->plan->gpos_feature_record_cond_idx_map;
|
||||||
}
|
}
|
||||||
|
|
|
@ -630,7 +630,7 @@ _populate_gids_to_retain (hb_subset_plan_t* plan,
|
||||||
plan,
|
plan,
|
||||||
plan->_glyphset_gsub,
|
plan->_glyphset_gsub,
|
||||||
plan->gsub_lookups,
|
plan->gsub_lookups,
|
||||||
plan->gsub_features,
|
&plan->gsub_features,
|
||||||
plan->gsub_langsys,
|
plan->gsub_langsys,
|
||||||
plan->gsub_feature_record_cond_idx_map,
|
plan->gsub_feature_record_cond_idx_map,
|
||||||
plan->gsub_feature_substitutes_map);
|
plan->gsub_feature_substitutes_map);
|
||||||
|
@ -640,7 +640,7 @@ _populate_gids_to_retain (hb_subset_plan_t* plan,
|
||||||
plan,
|
plan,
|
||||||
plan->_glyphset_gsub,
|
plan->_glyphset_gsub,
|
||||||
plan->gpos_lookups,
|
plan->gpos_lookups,
|
||||||
plan->gpos_features,
|
&plan->gpos_features,
|
||||||
plan->gpos_langsys,
|
plan->gpos_langsys,
|
||||||
plan->gpos_feature_record_cond_idx_map,
|
plan->gpos_feature_record_cond_idx_map,
|
||||||
plan->gpos_feature_substitutes_map);
|
plan->gpos_feature_substitutes_map);
|
||||||
|
@ -866,9 +866,6 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
|
||||||
plan->check_success (plan->gsub_langsys = hb_hashmap_create<unsigned, hb::unique_ptr<hb_set_t>> ());
|
plan->check_success (plan->gsub_langsys = hb_hashmap_create<unsigned, hb::unique_ptr<hb_set_t>> ());
|
||||||
plan->check_success (plan->gpos_langsys = hb_hashmap_create<unsigned, hb::unique_ptr<hb_set_t>> ());
|
plan->check_success (plan->gpos_langsys = hb_hashmap_create<unsigned, hb::unique_ptr<hb_set_t>> ());
|
||||||
|
|
||||||
plan->gsub_features = hb_map_create ();
|
|
||||||
plan->gpos_features = hb_map_create ();
|
|
||||||
|
|
||||||
plan->check_success (plan->gsub_feature_record_cond_idx_map = hb_hashmap_create<unsigned, hb::shared_ptr<hb_set_t>> ());
|
plan->check_success (plan->gsub_feature_record_cond_idx_map = hb_hashmap_create<unsigned, hb::shared_ptr<hb_set_t>> ());
|
||||||
plan->check_success (plan->gpos_feature_record_cond_idx_map = hb_hashmap_create<unsigned, hb::shared_ptr<hb_set_t>> ());
|
plan->check_success (plan->gpos_feature_record_cond_idx_map = hb_hashmap_create<unsigned, hb::shared_ptr<hb_set_t>> ());
|
||||||
|
|
||||||
|
|
|
@ -64,8 +64,6 @@ struct hb_subset_plan_t
|
||||||
hb_set_destroy (_glyphset_colred);
|
hb_set_destroy (_glyphset_colred);
|
||||||
hb_map_destroy (gsub_lookups);
|
hb_map_destroy (gsub_lookups);
|
||||||
hb_map_destroy (gpos_lookups);
|
hb_map_destroy (gpos_lookups);
|
||||||
hb_map_destroy (gsub_features);
|
|
||||||
hb_map_destroy (gpos_features);
|
|
||||||
hb_map_destroy (colrv1_layers);
|
hb_map_destroy (colrv1_layers);
|
||||||
hb_map_destroy (colr_palettes);
|
hb_map_destroy (colr_palettes);
|
||||||
hb_map_destroy (axes_index_map);
|
hb_map_destroy (axes_index_map);
|
||||||
|
@ -161,8 +159,8 @@ struct hb_subset_plan_t
|
||||||
hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *gpos_langsys;
|
hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *gpos_langsys;
|
||||||
|
|
||||||
//active features after removing redundant langsys and prune_features
|
//active features after removing redundant langsys and prune_features
|
||||||
hb_map_t *gsub_features;
|
hb_map_t gsub_features;
|
||||||
hb_map_t *gpos_features;
|
hb_map_t gpos_features;
|
||||||
|
|
||||||
//active feature variation records/condition index with variations
|
//active feature variation records/condition index with variations
|
||||||
hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *gsub_feature_record_cond_idx_map;
|
hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *gsub_feature_record_cond_idx_map;
|
||||||
|
|
Loading…
Reference in New Issue