diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-03-23 07:45:57 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-04-06 19:07:59 +0000 |
commit | c197629f8035023353c2ab678a46e212477f1536 (patch) | |
tree | 3efd476247198973779acbc3591dcad6e2a1ae6e /src/3rdparty/harfbuzz-ng/src/hb-aat-map.hh | |
parent | a0def9b90dd9eb18692b35df12e5a43ca0e5fa32 (diff) |
Update to Harfbuzz 2.8.0
This updates Harfbuzz to the latest version and also
adds an import script to help with this work in the
future.
Task-number: QTBUG-90217
Change-Id: I23eae7b7bbbd5001df9873e4784a0c4213de5508
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 70af64433f491ee28e8b4ff19ebf413d45960155)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-aat-map.hh')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-aat-map.hh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-aat-map.hh b/src/3rdparty/harfbuzz-ng/src/hb-aat-map.hh index 984a59cca5..5a0fa70544 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-aat-map.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-aat-map.hh @@ -64,19 +64,24 @@ struct hb_aat_map_builder_t { hb_aat_layout_feature_type_t type; hb_aat_layout_feature_selector_t setting; + bool is_exclusive; unsigned seq; /* For stable sorting only. */ HB_INTERNAL static int cmp (const void *pa, const void *pb) { const feature_info_t *a = (const feature_info_t *) pa; const feature_info_t *b = (const feature_info_t *) pb; - return (a->type != b->type) ? (a->type < b->type ? -1 : 1) : - (a->seq < b->seq ? -1 : a->seq > b->seq ? 1 : 0); + if (a->type != b->type) return (a->type < b->type ? -1 : 1); + if (!a->is_exclusive && + (a->setting & ~1) != (b->setting & ~1)) return (a->setting < b->setting ? -1 : 1); + return (a->seq < b->seq ? -1 : a->seq > b->seq ? 1 : 0); } - int cmp (hb_aat_layout_feature_type_t ty) const + /* compares type & setting only, not is_exclusive flag or seq number */ + int cmp (const feature_info_t& f) const { - return (type != ty) ? (type < ty ? -1 : 1) : 0; + return (f.type != type) ? (f.type < type ? -1 : 1) : + (f.setting != setting) ? (f.setting < setting ? -1 : 1) : 0; } }; |