[subset] convert no get/set prune unicode ranges to enum.
This commit is contained in:
parent
1b6c1aa684
commit
792e2ed61c
|
@ -374,6 +374,8 @@ hb_subset_input_get_flag (hb_subset_input_t *input,
|
|||
return input->passthrough_unrecognized;
|
||||
case HB_SUBSET_FLAG_NOTDEF_OUTLINE:
|
||||
return input->notdef_outline;
|
||||
case HB_SUBSET_FLAG_NO_PRUNE_UNICODE_RANGES:
|
||||
return input->no_prune_unicode_ranges;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -416,51 +418,16 @@ hb_subset_input_set_flag (hb_subset_input_t *input,
|
|||
break;
|
||||
case HB_SUBSET_FLAG_NOTDEF_OUTLINE:
|
||||
input->notdef_outline = value;
|
||||
break;
|
||||
case HB_SUBSET_FLAG_NO_PRUNE_UNICODE_RANGES:
|
||||
input->no_prune_unicode_ranges = value;
|
||||
break;
|
||||
default:
|
||||
// Do nothing.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
HB_EXTERN void
|
||||
hb_subset_input_set_overlaps_flag (hb_subset_input_t *subset_input,
|
||||
hb_bool_t overlaps_flag)
|
||||
{
|
||||
subset_input->overlaps_flag = overlaps_flag;
|
||||
}
|
||||
|
||||
HB_EXTERN hb_bool_t
|
||||
hb_subset_input_get_overlaps_flag (hb_subset_input_t *subset_input)
|
||||
{
|
||||
return subset_input->overlaps_flag;
|
||||
}
|
||||
|
||||
HB_EXTERN void
|
||||
hb_subset_input_set_notdef_outline (hb_subset_input_t *subset_input,
|
||||
hb_bool_t notdef_outline)
|
||||
{
|
||||
subset_input->notdef_outline = notdef_outline;
|
||||
}
|
||||
|
||||
HB_EXTERN hb_bool_t
|
||||
hb_subset_input_get_notdef_outline (hb_subset_input_t *subset_input)
|
||||
{
|
||||
return subset_input->notdef_outline;
|
||||
}
|
||||
|
||||
HB_EXTERN void
|
||||
hb_subset_input_set_no_prune_unicode_ranges (hb_subset_input_t *subset_input,
|
||||
hb_bool_t no_prune_unicode_ranges)
|
||||
{
|
||||
subset_input->no_prune_unicode_ranges = no_prune_unicode_ranges;
|
||||
}
|
||||
|
||||
HB_EXTERN hb_bool_t
|
||||
hb_subset_input_get_no_prune_unicode_ranges (hb_subset_input_t *subset_input)
|
||||
{
|
||||
return subset_input->no_prune_unicode_ranges;
|
||||
}
|
||||
|
||||
/**
|
||||
* hb_subset_input_set_user_data: (skip)
|
||||
* @input: A subset input object
|
||||
|
|
|
@ -59,6 +59,8 @@ typedef struct hb_subset_input_t hb_subset_input_t;
|
|||
* Defaults to false.
|
||||
* @HB_SUBSET_FLAG_NOTDEF_OUTLINE: If set the notdef glyph outline will be
|
||||
* 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.
|
||||
*
|
||||
* List of boolean properties that can be configured on the subset input.
|
||||
*
|
||||
|
@ -73,6 +75,7 @@ typedef enum
|
|||
HB_SUBSET_FLAG_SET_OVERLAPS_FLAG,
|
||||
HB_SUBSET_FLAG_PASSTHROUGH_UNRECOGNIZED,
|
||||
HB_SUBSET_FLAG_NOTDEF_OUTLINE,
|
||||
HB_SUBSET_FLAG_NO_PRUNE_UNICODE_RANGES,
|
||||
} hb_subset_flag_t;
|
||||
|
||||
HB_EXTERN hb_subset_input_t *
|
||||
|
@ -131,29 +134,6 @@ hb_subset_input_set_flag (hb_subset_input_t *input,
|
|||
hb_subset_flag_t flag,
|
||||
hb_bool_t value);
|
||||
|
||||
// TODO(garretrieger): remove bool property get/set methods.
|
||||
|
||||
HB_EXTERN void
|
||||
hb_subset_input_set_overlaps_flag (hb_subset_input_t *subset_input,
|
||||
hb_bool_t overlaps_flag);
|
||||
|
||||
HB_EXTERN hb_bool_t
|
||||
hb_subset_input_get_overlaps_flag (hb_subset_input_t *subset_input);
|
||||
|
||||
HB_EXTERN void
|
||||
hb_subset_input_set_notdef_outline (hb_subset_input_t *subset_input,
|
||||
hb_bool_t notdef_outline);
|
||||
|
||||
HB_EXTERN hb_bool_t
|
||||
hb_subset_input_get_notdef_outline (hb_subset_input_t *subset_input);
|
||||
|
||||
HB_EXTERN void
|
||||
hb_subset_input_set_no_prune_unicode_ranges (hb_subset_input_t *subset_input,
|
||||
hb_bool_t no_prune_unicode_ranges);
|
||||
|
||||
HB_EXTERN hb_bool_t
|
||||
hb_subset_input_get_no_prune_unicode_ranges (hb_subset_input_t *subset_input);
|
||||
|
||||
/* hb_subset () */
|
||||
HB_EXTERN hb_face_t *
|
||||
hb_subset (hb_face_t *source, const hb_subset_input_t *input);
|
||||
|
|
Loading…
Reference in New Issue