[subset] Add layout_scripts to subset input.

pull/3699/head
Garret Rieger 2 years ago
parent 41d2c335bc
commit 70e32a662f
  1. 2
      src/hb-subset-input.cc
  2. 1
      src/hb-subset-input.hh
  3. 3
      src/hb-subset-plan.cc
  4. 3
      src/hb-subset.h

@ -203,6 +203,8 @@ hb_subset_input_create_or_fail (void)
input->sets.layout_features->add_array (default_layout_features, ARRAY_LENGTH (default_layout_features));
input->sets.layout_scripts->invert (); // Default to all scripts.
if (input->in_error ())
{
hb_subset_input_destroy (input);

@ -50,6 +50,7 @@ struct hb_subset_input_t
hb_set_t *name_ids;
hb_set_t *name_languages;
hb_set_t *layout_features;
hb_set_t *layout_scripts;
};
union {

@ -555,8 +555,7 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
_nameid_closure (face, plan->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_create ();
hb_set_invert (plan->layout_scripts);
plan->layout_scripts = hb_set_copy (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);

@ -100,6 +100,8 @@ typedef enum { /*< flags >*/
* @HB_SUBSET_SETS_NAME_LANG_ID: the set of name lang ids that will be retained.
* @HB_SUBSET_SETS_LAYOUT_FEATURE_TAG: the set of layout feature tags that will be retained
* in the subset.
* @HB_SUBSET_SETS_LAYOUT_SCRIPT_TAG: the set of layout script tags that will be retained
* in the subset. Defaults to all tags.
*
* List of sets that can be configured on the subset input.
*
@ -113,6 +115,7 @@ typedef enum {
HB_SUBSET_SETS_NAME_ID,
HB_SUBSET_SETS_NAME_LANG_ID,
HB_SUBSET_SETS_LAYOUT_FEATURE_TAG,
HB_SUBSET_SETS_LAYOUT_SCRIPT_TAG,
} hb_subset_sets_t;
HB_EXTERN hb_subset_input_t *

Loading…
Cancel
Save