summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2014-04-10 13:50:01 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-14 06:43:54 +0200
commitef77c16cb00ef3788e58da8b35cb91eaf2eaa591 (patch)
treeaacc34cdd3aa8706e857e03d87f782070f8a3c41 /tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
parent3a4bd21db55a6c08ad0a8e09be0699085c7c4b59 (diff)
Make HarfBuzz-NG the default shaper on Mac
For AAT shaping support, we need either the pre-QPA shaping trick or the new HarfBuzz on Mac; prefer the latter. Disable some test cases aimed to test the HB-old behavior; enable ones that should guarantee shaping-unaware behavior. [ChangeLog][OS X] Use CoreText text shaping engine for support of complex scripts. If required, the shaping engine used in previous versions can be preferred by configuring Qt with -no-harfbuzz. Alternatively, the QT_HARFBUZZ environment variable could be set to "old". Task-number: QTBUG-18980 (relates) Task-number: QTBUG-38246 Change-Id: Iee6fe4f5bc047e77259182b8585385c5febd02b3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp')
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index c4db669695..5dfb025510 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -1105,6 +1105,9 @@ void tst_QTextScriptEngine::mirroredChars()
void tst_QTextScriptEngine::controlInSyllable_qtbug14204()
{
+#ifdef Q_OS_MAC
+ QSKIP("Result differs for HarfBuzz-NG, skip test.");
+#endif
QFontDatabase db;
if (!db.families().contains(QStringLiteral("Aparajita")))
QSKIP("couldn't find 'Aparajita' font");
@@ -1143,6 +1146,10 @@ void tst_QTextScriptEngine::combiningMarks_qtbug15675_data()
QTest::addColumn<QFont>("font");
QTest::addColumn<QString>("string");
+#ifdef Q_OS_MAC
+ QSKIP("Result differs for HarfBuzz-NG, skip test.");
+#endif
+
bool hasTests = false;
QStringList families;
@@ -1274,13 +1281,22 @@ void tst_QTextScriptEngine::thaiWithZWJ()
QCOMPARE(logClusters[i], ushort(i));
for (int i = 0; i < 10; i++)
QCOMPARE(logClusters[i+7], ushort(0));
+#ifndef Q_OS_MAC
+ // ### Result differs for HarfBuzz-NG
QCOMPARE(logClusters[17], ushort(1));
+#endif
// A thai implementation could either remove the ZWJ and ZWNJ characters, or hide them.
// The current implementation hides them, so we test for that.
// The only characters that we should be hiding are the ZWJ and ZWNJ characters in position 1 and 3.
const QGlyphLayout glyphLayout = e->layoutData->glyphLayout;
for (int i = 0; i < 18; i++) {
+#ifdef Q_OS_MAC
+ // ### Result differs for HarfBuzz-NG
+ if (i == 17)
+ QCOMPARE(glyphLayout.advances[i].toInt(), 0);
+ else
+#endif
if (i == 1 || i == 3)
QCOMPARE(glyphLayout.advances[i].toInt(), 0);
else