|
|
|
@ -49,7 +49,7 @@ hb_subset_input_create_or_fail (void) |
|
|
|
|
set = hb_set_create (); |
|
|
|
|
|
|
|
|
|
input->axes_location = hb_hashmap_create<hb_tag_t, float> (); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!input->axes_location || input->in_error ()) |
|
|
|
|
{ |
|
|
|
|
hb_subset_input_destroy (input); |
|
|
|
@ -430,4 +430,52 @@ hb_subset_input_pin_axis_location (hb_subset_input_t *input, |
|
|
|
|
return input->axes_location->set (axis_tag, val); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* hb_subset_preprocess |
|
|
|
|
* @input: a #hb_face_t object. |
|
|
|
|
* |
|
|
|
|
* Preprocesses the face and attaches data that will be needed by the |
|
|
|
|
* subsetter. Future subsetting operations can then use the precomputed data |
|
|
|
|
* to speed up the subsetting operation. |
|
|
|
|
* |
|
|
|
|
* Since: EXPERIMENTAL |
|
|
|
|
**/ |
|
|
|
|
|
|
|
|
|
hb_face_t * |
|
|
|
|
hb_subset_preprocess (hb_face_t *source) |
|
|
|
|
{ |
|
|
|
|
hb_subset_input_t* input = hb_subset_input_create_or_fail (); |
|
|
|
|
|
|
|
|
|
hb_set_clear (hb_subset_input_set(input, HB_SUBSET_SETS_UNICODE)); |
|
|
|
|
hb_set_invert (hb_subset_input_set(input, HB_SUBSET_SETS_UNICODE)); |
|
|
|
|
|
|
|
|
|
hb_set_clear (hb_subset_input_set(input, |
|
|
|
|
HB_SUBSET_SETS_LAYOUT_FEATURE_TAG)); |
|
|
|
|
hb_set_invert (hb_subset_input_set(input, |
|
|
|
|
HB_SUBSET_SETS_LAYOUT_FEATURE_TAG)); |
|
|
|
|
|
|
|
|
|
hb_set_clear (hb_subset_input_set(input, |
|
|
|
|
HB_SUBSET_SETS_LAYOUT_SCRIPT_TAG)); |
|
|
|
|
hb_set_invert (hb_subset_input_set(input, |
|
|
|
|
HB_SUBSET_SETS_LAYOUT_SCRIPT_TAG)); |
|
|
|
|
|
|
|
|
|
hb_set_clear (hb_subset_input_set(input, |
|
|
|
|
HB_SUBSET_SETS_NAME_ID)); |
|
|
|
|
hb_set_invert (hb_subset_input_set(input, |
|
|
|
|
HB_SUBSET_SETS_NAME_ID)); |
|
|
|
|
|
|
|
|
|
hb_subset_input_set_flags(input, |
|
|
|
|
HB_SUBSET_FLAGS_NOTDEF_OUTLINE | |
|
|
|
|
HB_SUBSET_FLAGS_GLYPH_NAMES | |
|
|
|
|
HB_SUBSET_FLAGS_RETAIN_GIDS); |
|
|
|
|
input->attach_accelerator_data = true; |
|
|
|
|
|
|
|
|
|
hb_face_t* new_source = hb_subset_or_fail (source, input); |
|
|
|
|
hb_subset_input_destroy (input); |
|
|
|
|
|
|
|
|
|
return new_source; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|