summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh44
1 files changed, 38 insertions, 6 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh b/src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh
index af2337e494..cc9cb7a1a2 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh
+++ b/src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh
@@ -39,9 +39,11 @@ 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;
// For each cp that we'd like to retain maps to the corresponding gid.
hb_set_t *unicodes;
@@ -49,6 +51,12 @@ struct hb_subset_plan_t
// name_ids we would like to retain
hb_set_t *name_ids;
+ // name_languages we would like to retain
+ hb_set_t *name_languages;
+
+ //glyph ids requested to retain
+ hb_set_t *glyphs_requested;
+
// Tables which should be dropped.
hb_set_t *drop_tables;
@@ -67,8 +75,29 @@ struct hb_subset_plan_t
hb_set_t *_glyphset;
hb_set_t *_glyphset_gsub;
+ //active lookups we'd like to retain
+ hb_map_t *gsub_lookups;
+ hb_map_t *gpos_lookups;
+
+ //active features we'd like to retain
+ hb_map_t *gsub_features;
+ hb_map_t *gpos_features;
+
+ //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
+ hb_map_t *layout_variation_idx_map;
+
public:
+ bool in_error () const { return !successful; }
+
+ bool check_success(bool success)
+ {
+ successful = (successful && success);
+ return successful;
+ }
+
/*
* The set of input glyph ids which will be retained in the subset.
* Does NOT include ids kept due to retain_gids. You probably want to use
@@ -143,12 +172,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);
}
};