Merge pull request #3071 from harfbuzz/subset-flags

[sebset] Use [s|g]et_flag for retain_all_layout_features
This commit is contained in:
Behdad Esfahbod 2021-07-26 11:07:55 -07:00 committed by GitHub
commit 404b91b93d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 22 deletions

View File

@ -721,8 +721,6 @@ hb_subset_input_glyph_set
hb_subset_input_nameid_set
hb_subset_input_namelangid_set
hb_subset_input_layout_features_set
hb_subset_input_set_retain_all_features
hb_subset_input_get_retain_all_features
hb_subset_input_no_subset_tables_set
hb_subset_input_drop_tables_set
hb_subset_input_get_flag

View File

@ -325,20 +325,6 @@ hb_subset_input_layout_features_set (hb_subset_input_t *input)
return input->layout_features;
}
HB_EXTERN void
hb_subset_input_set_retain_all_features (hb_subset_input_t *input,
hb_bool_t value)
{
input->retain_all_layout_features = value;
}
HB_EXTERN hb_bool_t
hb_subset_input_get_retain_all_features (hb_subset_input_t *input)
{
return input->retain_all_layout_features;
}
/**
* hb_subset_input_drop_tables_set:
* @input: a #hb_subset_input_t object.
@ -407,6 +393,8 @@ hb_subset_input_get_flag (hb_subset_input_t *input,
return input->notdef_outline;
case HB_SUBSET_FLAG_NO_PRUNE_UNICODE_RANGES:
return input->no_prune_unicode_ranges;
case HB_SUBSET_FLAG_RETAIN_ALL_FEATURES:
return input->retain_all_layout_features;
default:
return false;
}
@ -453,6 +441,9 @@ hb_subset_input_set_flag (hb_subset_input_t *input,
case HB_SUBSET_FLAG_NO_PRUNE_UNICODE_RANGES:
input->no_prune_unicode_ranges = value;
break;
case HB_SUBSET_FLAG_RETAIN_ALL_FEATURES:
input->retain_all_layout_features = value;
break;
default:
// Do nothing.
break;

View File

@ -61,6 +61,10 @@ typedef struct hb_subset_input_t hb_subset_input_t;
* retained in the final subset. Defaults to false.
* @HB_SUBSET_FLAG_NO_PRUNE_UNICODE_RANGES: If set then the unicode ranges in
* OS/2 will not be recalculated.
* @HB_SUBSET_FLAG_RETAIN_ALL_FEATURES: If set all layout features will be
* retained. If unset then the set accessed by
* hb_subset_input_layout_features_set() will be used to determine the features
* to be retained.
*
* List of boolean properties that can be configured on the subset input.
*
@ -76,6 +80,7 @@ typedef enum
HB_SUBSET_FLAG_PASSTHROUGH_UNRECOGNIZED,
HB_SUBSET_FLAG_NOTDEF_OUTLINE,
HB_SUBSET_FLAG_NO_PRUNE_UNICODE_RANGES,
HB_SUBSET_FLAG_RETAIN_ALL_FEATURES,
} hb_subset_flag_t;
HB_EXTERN hb_subset_input_t *
@ -113,12 +118,6 @@ hb_subset_input_namelangid_set (hb_subset_input_t *input);
HB_EXTERN hb_set_t *
hb_subset_input_layout_features_set (hb_subset_input_t *input);
HB_EXTERN void
hb_subset_input_set_retain_all_features (hb_subset_input_t *input,
hb_bool_t value);
HB_EXTERN hb_bool_t
hb_subset_input_get_retain_all_features (hb_subset_input_t *input);
HB_EXTERN hb_set_t *
hb_subset_input_no_subset_tables_set (hb_subset_input_t *input);