summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp')
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 638f13aea2..73678585d6 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -103,6 +103,8 @@ private slots:
void mirroredChars_data();
void mirroredChars();
+ void thaiIsolatedSaraAm();
+
private:
bool haveTestFonts;
};
@@ -1256,5 +1258,27 @@ 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.");
+}
+
QTEST_MAIN(tst_QTextScriptEngine)
#include "tst_qtextscriptengine.moc"