summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2019-11-11 15:10:08 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-03-04 08:28:04 +0100
commitfb2f42b6044fe4673e71f3d12082b53c9f3182cd (patch)
treed2f579c0362be1def50d957bc4e46eb27ea6198a /tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
parent4724dfff627f3cd3754f5d4a827c6b6790a89955 (diff)
Update to Harfbuzz 2.6.4
Quite a big change since it has been several years since the last update. This drops the Harfbuzz source on top of the existing code in Qt, and does the following additional changes: 1. Deletes old source files that have been removed upstream (everything named foo-private.hh is now renamed to just foo.hh for instance). 2. Added a header guard to config.h because it may be double-included. 3. Implement a memory barrier needed by hb-atomic.hh. 4. Changed the signature of hb_atomic_int_impl_add() to take a pointer to match new upstream. 5. Updated .pro file to include new files and removed old. 6. Updated qt_attribution.json 7. No longer disable deprecated APIs since hb_ot_tags_from_script() is now deprecated and is used from Qt code. 8. Updated and applied the patch in patches/ for CoreText. 9. Updated tst_qtextscriptengine::thaiWithZWJ() according to changes in Harfbuzz and disabled it for system-harfbuzz, since this may be an older version of harfbuzz depending on the system. Fixes: QTBUG-79606 Change-Id: I3f057a43ff44ee416628b75ef12fb1a221f31910 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp')
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 348042bacb..cea1dc6dd3 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -1210,6 +1210,10 @@ void tst_QTextScriptEngine::thaiIsolatedSaraAm()
void tst_QTextScriptEngine::thaiWithZWJ()
{
+#if QT_CONFIG(system_harfbuzz)
+ QSKIP("Requires up-to-date Harfbuzz");
+#endif
+
QFontDatabase db;
if (!db.families().contains("Waree"))
QSKIP("couldn't find 'Waree' font");
@@ -1236,14 +1240,13 @@ void tst_QTextScriptEngine::thaiWithZWJ()
QCOMPARE(e->layoutData->items[2].num_glyphs, ushort(2)); // Thai: Thai character followed by superscript "a" which is of inherited type
//A quick sanity check - check all the characters are individual clusters
- // A thai implementation could either remove the ZWJ and ZWNJ characters, or hide them.
- // The current implementation hides them, so we test for that.
+ // A thai implementation could either remove the ZWJ character, or hide it.
+ // The current implementation merges the cluster for ZWJ and keeps ZWNJ, so we test for that.
unsigned short *logClusters = e->layoutData->logClustersPtr;
QCOMPARE(logClusters[0], ushort(0));
QCOMPARE(logClusters[1], ushort(0));
QCOMPARE(logClusters[2], ushort(2));
- QCOMPARE(logClusters[3], ushort(2));
- for (int i = 4; i < 15; i++)
+ for (int i = 3; i < 15; i++)
QCOMPARE(logClusters[i], ushort(i));
for (int i = 0; i < 3; i++)
QCOMPARE(logClusters[i+15], ushort(0));