summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2021-03-26 07:44:45 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-04-13 10:02:02 +0000
commitcd9bbcd97abe474cd001dadf86920febba7ef70e (patch)
tree64ec383bdb70492e440213ae949ae2f97beac6a5 /src/gui
parent7fe1114dc7b36e90c0b87dc464f72a84e87a7474 (diff)
Adapt to Harfbuzz 2.8.0 update
The Unicode 13 language tags are available since Harfbuzz 2.6.7. For compilation with earlier versions, also update the hardcoded tags to match the ones in Harfbuzz (and in iso-15924): https://unicode.org/iso15924/iso15924-codes.html Task-number: QTBUG-90217 Change-Id: I4e2cfdf61a5c4189b8aac51644c9d80c816aeebc Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 910ac477f013f2af690b66f1ac41d65ab7527843) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qharfbuzzng.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/text/qharfbuzzng.cpp b/src/gui/text/qharfbuzzng.cpp
index b4b67adc3e..66d5def056 100644
--- a/src/gui/text/qharfbuzzng.cpp
+++ b/src/gui/text/qharfbuzzng.cpp
@@ -232,11 +232,18 @@ static const hb_script_t _qtscript_to_hbscript[] = {
HB_SCRIPT_NYIAKENG_PUACHUE_HMONG,
HB_SCRIPT_WANCHO,
- // Unicode 13.0 additions (not present in harfbuzz-ng 2.6.4)
- hb_script_t(HB_TAG('C', 'h', 'o', 'r')), // Script_Chorasmian
- hb_script_t(HB_TAG('D', 'i', 'v', 'e')), // Script_DivesAkuru
- hb_script_t(HB_TAG('K', 'h', 'i', 't')), // Script_KhitanSmallScript
+ // Unicode 13.0 additions (not present in harfbuzz-ng 2.6.6 and earlier)
+#if !HB_VERSION_ATLEAST(2, 6, 7)
+ hb_script_t(HB_TAG('C', 'h', 'r', 's')), // Script_Chorasmian
+ hb_script_t(HB_TAG('D', 'i', 'a', 'k')), // Script_DivesAkuru
+ hb_script_t(HB_TAG('K', 'i', 't', 's')), // Script_KhitanSmallScript
hb_script_t(HB_TAG('Y', 'e', 'z', 'i')), // Script_Yezidi
+#else
+ HB_SCRIPT_CHORASMIAN,
+ HB_SCRIPT_DIVES_AKURU,
+ HB_SCRIPT_KHITAN_SMALL_SCRIPT,
+ HB_SCRIPT_YEZIDI
+#endif
};
static_assert(QChar::ScriptCount == sizeof(_qtscript_to_hbscript) / sizeof(_qtscript_to_hbscript[0]));