summaryrefslogtreecommitdiff
path: root/thirdparty/harfbuzz/src/hb-subset-repacker.cc
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-08-04 08:16:56 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-08-04 09:10:16 +0300
commit2980c0d60cb067d7958abe5924be5c455b4adba3 (patch)
tree879c35a6013cbae63dc2045e292d6a25f6ea46a8 /thirdparty/harfbuzz/src/hb-subset-repacker.cc
parentea4b8de2b4c06e6f18bf0470d716f787bddfecc3 (diff)
HarfBuzz: Update to version 5.1.0, use new FLAG_SAFE_TO_INSERT_TATWEEL flag to improve justification.
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-subset-repacker.cc')
-rw-r--r--thirdparty/harfbuzz/src/hb-subset-repacker.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/thirdparty/harfbuzz/src/hb-subset-repacker.cc b/thirdparty/harfbuzz/src/hb-subset-repacker.cc
index 03e3feb1f6..55ca48d709 100644
--- a/thirdparty/harfbuzz/src/hb-subset-repacker.cc
+++ b/thirdparty/harfbuzz/src/hb-subset-repacker.cc
@@ -25,18 +25,24 @@
#include "hb-repacker.hh"
#ifdef HB_EXPERIMENTAL_API
+
/**
* hb_subset_repack_or_fail:
+ * @table_tag: tag of the table being packed, needed to allow table specific optimizations.
* @hb_objects: raw array of struct hb_object_t, which provides
* object graph info
* @num_hb_objs: number of hb_object_t in the hb_objects array.
*
* Given the input object graph info, repack a table to eliminate
* offset overflows. A nullptr is returned if the repacking attempt fails.
+ * Table specific optimizations (eg. extension promotion in GSUB/GPOS) may be performed.
+ * Passing HB_TAG_NONE will disable table specific optimizations.
*
* Since: EXPERIMENTAL
**/
-hb_blob_t* hb_subset_repack_or_fail (hb_object_t* hb_objects, unsigned num_hb_objs)
+hb_blob_t* hb_subset_repack_or_fail (hb_tag_t table_tag,
+ hb_object_t* hb_objects,
+ unsigned num_hb_objs)
{
hb_vector_t<const hb_object_t *> packed;
packed.alloc (num_hb_objs + 1);
@@ -44,6 +50,9 @@ hb_blob_t* hb_subset_repack_or_fail (hb_object_t* hb_objects, unsigned num_hb_ob
for (unsigned i = 0 ; i < num_hb_objs ; i++)
packed.push (&(hb_objects[i]));
- return hb_resolve_overflows (packed, HB_OT_TAG_GSUB);
+ return hb_resolve_overflows (packed,
+ table_tag,
+ 20,
+ true);
}
#endif