diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index d756bce81..71eb1821e 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -158,7 +158,7 @@ struct hb_subset_layout_context_t : { lookup_index_map = c_->plan->gsub_lookups; 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_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; 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_record_cond_idx_map = c_->plan->user_axes_location->is_empty () ? nullptr : c_->plan->gpos_feature_record_cond_idx_map; } diff --git a/src/hb-subset-plan.cc b/src/hb-subset-plan.cc index 57bf19323..895188f7e 100644 --- a/src/hb-subset-plan.cc +++ b/src/hb-subset-plan.cc @@ -630,7 +630,7 @@ _populate_gids_to_retain (hb_subset_plan_t* plan, plan, plan->_glyphset_gsub, plan->gsub_lookups, - plan->gsub_features, + &plan->gsub_features, plan->gsub_langsys, plan->gsub_feature_record_cond_idx_map, plan->gsub_feature_substitutes_map); @@ -640,7 +640,7 @@ _populate_gids_to_retain (hb_subset_plan_t* plan, plan, plan->_glyphset_gsub, plan->gpos_lookups, - plan->gpos_features, + &plan->gpos_features, plan->gpos_langsys, plan->gpos_feature_record_cond_idx_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> ()); plan->check_success (plan->gpos_langsys = hb_hashmap_create> ()); - 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> ()); plan->check_success (plan->gpos_feature_record_cond_idx_map = hb_hashmap_create> ()); diff --git a/src/hb-subset-plan.hh b/src/hb-subset-plan.hh index 5b312a22e..48b2f9178 100644 --- a/src/hb-subset-plan.hh +++ b/src/hb-subset-plan.hh @@ -64,8 +64,6 @@ struct hb_subset_plan_t hb_set_destroy (_glyphset_colred); hb_map_destroy (gsub_lookups); hb_map_destroy (gpos_lookups); - hb_map_destroy (gsub_features); - hb_map_destroy (gpos_features); hb_map_destroy (colrv1_layers); hb_map_destroy (colr_palettes); hb_map_destroy (axes_index_map); @@ -161,8 +159,8 @@ struct hb_subset_plan_t hb_hashmap_t> *gpos_langsys; //active features after removing redundant langsys and prune_features - hb_map_t *gsub_features; - hb_map_t *gpos_features; + hb_map_t gsub_features; + hb_map_t gpos_features; //active feature variation records/condition index with variations hb_hashmap_t> *gsub_feature_record_cond_idx_map;