summaryrefslogtreecommitdiff
path: root/tests/auto/qtextscriptengine
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtextscriptengine')
-rw-r--r--tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
index 6a1aaad63d..eafbebd80a 100644
--- a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -111,6 +111,8 @@ private slots:
void mirroredChars_data();
void mirroredChars();
+
+ void thaiIsolatedSaraAm();
};
tst_QTextScriptEngine::tst_QTextScriptEngine()
@@ -1239,5 +1241,28 @@ void tst_QTextScriptEngine::mirroredChars()
}
}
+void tst_QTextScriptEngine::thaiIsolatedSaraAm()
+{
+ if (QFontDatabase().families(QFontDatabase::Any).contains("Waree")) {
+ QString s;
+ s.append(QChar(0x0e33));
+
+ QTextLayout layout(s, QFont("Waree"));
+ layout.beginLayout();
+ layout.createLine();
+ layout.endLayout();
+
+ QTextEngine *e = layout.engine();
+ e->itemize();
+ e->shape(0);
+
+ QCOMPARE(e->layoutData->items[0].num_glyphs, ushort(3));
+
+ unsigned short *logClusters = e->layoutData->logClustersPtr;
+ QCOMPARE(logClusters[0], ushort(0));
+ } else
+ QSKIP("Cannot find Waree.", SkipAll);
+}
+
QTEST_MAIN(tst_QTextScriptEngine)
#include "tst_qtextscriptengine.moc"