diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2023-02-27 09:53:00 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2023-03-01 06:37:29 +0100 |
commit | a6edf9cbe5bd1d1c6bc08733f97fc07812126bde (patch) | |
tree | 7013520fe3cf1828c75c3eee562c90c41465b567 /src/3rdparty/harfbuzz-ng/src/hb-ot-post-table.hh | |
parent | 5f32c9edce208125f642c86a4bc9e73564386243 (diff) |
Update Harfbuzz to 7.0.1
Note: 6.4.x update has to be done in a separate commit
because it did not get the update to 6.0.0, so the
cherry-pick will not apply.
Pick-to: 6.2 6.5
Task-number: QTBUG-111535
Change-Id: I9d4aae98f8267827ec983ca89b1310006c6aee78
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-ot-post-table.hh')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-ot-post-table.hh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-post-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-post-table.hh index a04b80357b..e0eb770948 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-post-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-post-table.hh @@ -28,6 +28,7 @@ #define HB_OT_POST_TABLE_HH #include "hb-open-type.hh" +#include "hb-ot-var-mvar-table.hh" #define HB_STRING_ARRAY_NAME format1_names #define HB_STRING_ARRAY_LIST "hb-ot-post-macroman.hh" @@ -98,14 +99,25 @@ struct post post *post_prime = c->serializer->start_embed<post> (); if (unlikely (!post_prime)) return_trace (false); +#ifndef HB_NO_VAR + if (c->plan->normalized_coords) + { + auto &MVAR = *c->plan->source->table.MVAR; + auto *table = post_prime; + + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_UNDERLINE_SIZE, underlineThickness); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_UNDERLINE_OFFSET, underlinePosition); + } +#endif + bool glyph_names = c->plan->flags & HB_SUBSET_FLAGS_GLYPH_NAMES; if (!serialize (c->serializer, glyph_names)) return_trace (false); - if (c->plan->user_axes_location->has (HB_TAG ('s','l','n','t')) && + if (c->plan->user_axes_location.has (HB_TAG ('s','l','n','t')) && !c->plan->pinned_at_default) { - float italic_angle = c->plan->user_axes_location->get (HB_TAG ('s','l','n','t')); + float italic_angle = c->plan->user_axes_location.get (HB_TAG ('s','l','n','t')); italic_angle = hb_max (-90.f, hb_min (italic_angle, 90.f)); post_prime->italicAngle.set_float (italic_angle); } @@ -134,6 +146,7 @@ struct post pool = &StructAfter<uint8_t> (v2.glyphNameIndex); const uint8_t *end = (const uint8_t *) (const void *) table + table_length; + index_to_offset.alloc (hb_min (face->get_num_glyphs (), table_length / 8)); for (const uint8_t *data = pool; index_to_offset.length < 65535 && data < end && data + *data < end; data += 1 + *data) |