diff options
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-subset-plan.hh')
-rw-r--r-- | thirdparty/harfbuzz/src/hb-subset-plan.hh | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/thirdparty/harfbuzz/src/hb-subset-plan.hh b/thirdparty/harfbuzz/src/hb-subset-plan.hh index e9f603dd1d..92a4e27ccc 100644 --- a/thirdparty/harfbuzz/src/hb-subset-plan.hh +++ b/thirdparty/harfbuzz/src/hb-subset-plan.hh @@ -39,11 +39,8 @@ struct hb_subset_plan_t { hb_object_header_t header; - bool successful : 1; - bool drop_hints : 1; - bool desubroutinize : 1; - bool retain_gids : 1; - bool name_legacy : 1; + bool successful; + unsigned flags; // For each cp that we'd like to retain maps to the corresponding gid. hb_set_t *unicodes; @@ -54,9 +51,15 @@ struct hb_subset_plan_t // name_languages we would like to retain hb_set_t *name_languages; + //layout features which will be preserved + hb_set_t *layout_features; + //glyph ids requested to retain hb_set_t *glyphs_requested; + // Tables which should not be processed, just pass them through. + hb_set_t *no_subset_tables; + // Tables which should be dropped. hb_set_t *drop_tables; @@ -79,10 +82,18 @@ struct hb_subset_plan_t hb_map_t *gsub_lookups; hb_map_t *gpos_lookups; - //active features we'd like to retain + //active langsys we'd like to retain + hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *gsub_langsys; + hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *gpos_langsys; + + //active features after removing redundant langsys and prune_features hb_map_t *gsub_features; hb_map_t *gpos_features; + //active layers/palettes we'd like to retain + hb_map_t *colrv1_layers; + hb_map_t *colr_palettes; + //The set of layout item variation store delta set indices to be retained hb_set_t *layout_variation_indices; //Old -> New layout item variation store delta set index mapping @@ -172,12 +183,15 @@ struct hb_subset_plan_t add_table (hb_tag_t tag, hb_blob_t *contents) { - hb_blob_t *source_blob = source->reference_table (tag); - DEBUG_MSG(SUBSET, nullptr, "add table %c%c%c%c, dest %d bytes, source %d bytes", - HB_UNTAG(tag), - hb_blob_get_length (contents), - hb_blob_get_length (source_blob)); - hb_blob_destroy (source_blob); + if (HB_DEBUG_SUBSET) + { + hb_blob_t *source_blob = source->reference_table (tag); + DEBUG_MSG(SUBSET, nullptr, "add table %c%c%c%c, dest %d bytes, source %d bytes", + HB_UNTAG(tag), + hb_blob_get_length (contents), + hb_blob_get_length (source_blob)); + hb_blob_destroy (source_blob); + } return hb_face_builder_add_table (dest, tag, contents); } }; @@ -186,7 +200,7 @@ typedef struct hb_subset_plan_t hb_subset_plan_t; HB_INTERNAL hb_subset_plan_t * hb_subset_plan_create (hb_face_t *face, - hb_subset_input_t *input); + const hb_subset_input_t *input); HB_INTERNAL void hb_subset_plan_destroy (hb_subset_plan_t *plan); |