diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index af66d6dd4..d756bce81 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -1145,7 +1145,7 @@ struct Script { TRACE_SUBSET (this); if (!l->visitScript ()) return_trace (false); - if (tag && !c->plan->layout_scripts->has (*tag)) + if (tag && !c->plan->layout_scripts.has (*tag)) return false; auto *out = c->serializer->start_embed (*this); diff --git a/src/hb-subset-plan.cc b/src/hb-subset-plan.cc index 9ddd7f76e..0ea120dff 100644 --- a/src/hb-subset-plan.cc +++ b/src/hb-subset-plan.cc @@ -145,7 +145,7 @@ static void _collect_layout_indices (hb_subset_plan_t *plan, hb_vector_t scripts; if (!plan->check_success (scripts.resize (num_scripts))) return; table.get_script_tags (0, &num_scripts, scripts.arrayZ); - bool retain_all_scripts = !_filter_tag_list (&scripts, plan->layout_scripts); + bool retain_all_scripts = !_filter_tag_list (&scripts, &plan->layout_scripts); if (!plan->check_success (!features.in_error ()) || !features || !plan->check_success (!scripts.in_error ()) || !scripts) @@ -301,7 +301,7 @@ _closure_glyphs_lookups_features (hb_subset_plan_t *plan, _GSUBGPOS_find_duplicate_features (*table, lookups, &feature_indices, feature_substitutes_map, &duplicate_feature_map); feature_indices.clear (); - table->prune_langsys (&duplicate_feature_map, plan->layout_scripts, langsys_map, &feature_indices); + table->prune_langsys (&duplicate_feature_map, &plan->layout_scripts, langsys_map, &feature_indices); _remap_indexes (&feature_indices, features); table.destroy (); @@ -845,7 +845,7 @@ hb_subset_plan_create_or_fail (hb_face_t *face, plan->name_ids = hb_set_copy (input->sets.name_ids); plan->name_languages = hb_set_copy (input->sets.name_languages); plan->layout_features = hb_set_copy (input->sets.layout_features); - plan->layout_scripts = hb_set_copy (input->sets.layout_scripts); + plan->layout_scripts = *input->sets.layout_scripts; plan->glyphs_requested = hb_set_copy (input->sets.glyphs); plan->drop_tables = hb_set_copy (input->sets.drop_tables); plan->no_subset_tables = hb_set_copy (input->sets.no_subset_tables); diff --git a/src/hb-subset-plan.hh b/src/hb-subset-plan.hh index a3cbee41c..ee1617299 100644 --- a/src/hb-subset-plan.hh +++ b/src/hb-subset-plan.hh @@ -52,7 +52,6 @@ struct hb_subset_plan_t hb_set_destroy (name_ids); hb_set_destroy (name_languages); hb_set_destroy (layout_features); - hb_set_destroy (layout_scripts); hb_set_destroy (glyphs_requested); hb_set_destroy (drop_tables); hb_set_destroy (no_subset_tables); @@ -127,7 +126,7 @@ struct hb_subset_plan_t hb_set_t *layout_features; // layout scripts which will be preserved. - hb_set_t *layout_scripts; + hb_set_t layout_scripts; //glyph ids requested to retain hb_set_t *glyphs_requested;