diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-03-23 07:45:57 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-04-06 12:55:18 +0100 |
commit | 70af64433f491ee28e8b4ff19ebf413d45960155 (patch) | |
tree | 46dd5971011d619377ed233469f33c33f303d79e /src/3rdparty/harfbuzz-ng/src/hb-aat-map.hh | |
parent | 29450dfa283bc08f1999ac6dfc5c4956cc9af044 (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
Pick-to: 6.1
Change-Id: I23eae7b7bbbd5001df9873e4784a0c4213de5508
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
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; } }; |