summaryrefslogtreecommitdiff
path: root/tests/auto/qtextscriptengine
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2010-03-26 22:36:34 +0100
committerLars Knoll <lars.knoll@nokia.com>2010-03-26 22:36:34 +0100
commit8db35fe685d115f136bb2ec0305300dd082b278b (patch)
treef37077d6bee42a709ff31553dfc4fa5b124e385d /tests/auto/qtextscriptengine
parent0e7a43dba248030c673be5deab8ca70d14c0798f (diff)
downloadqt4-tools-8db35fe685d115f136bb2ec0305300dd082b278b.tar.gz
Fix a bug in greek shaping causing infinite loops
Update harfbuzz to 33b9cde6a08293d26047734e046c6677a2959adb Reviewed-By: TrustMe AutoTest: qtextscriptengine Task-number: QTBUG-391
Diffstat (limited to 'tests/auto/qtextscriptengine')
-rw-r--r--tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
index 841f5b90c7..018c036722 100644
--- a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -1068,6 +1068,42 @@ void tst_QTextScriptEngine::greek()
QSKIP("couln't find DejaVu Sans", SkipAll);
}
}
+
+ {
+ if (QFontDatabase().families(QFontDatabase::Any).contains("SBL Greek")) {
+ QFont f("SBL Greek");
+ for (int uc = 0x1f00; uc <= 0x1fff; ++uc) {
+ QString str;
+ str.append(uc);
+ if (str.normalized(QString::NormalizationForm_D).normalized(QString::NormalizationForm_C) != str) {
+ //qDebug() << "skipping" << hex << uc;
+ continue;
+ }
+ if (uc == 0x1fc1 || uc == 0x1fed)
+ continue;
+ QVERIFY( decomposedShaping(f, QChar(uc) ) );
+
+ }
+
+ const ShapeTable shape_table [] = {
+ { { 0x3b1, 0x300, 0x313, 0x0 },
+ { 0xb8, 0x3d3, 0x3c7, 0x0 } },
+ { { 0x3b1, 0x313, 0x300, 0x0 },
+ { 0xd4, 0x0 } },
+
+ { {0}, {0} }
+ };
+
+
+ const ShapeTable *s = shape_table;
+ while (s->unicode[0]) {
+ QVERIFY( shaping(f, s) );
+ ++s;
+ }
+ } else {
+ QSKIP("couln't find SBL_grk", SkipAll);
+ }
+ }
#else
QSKIP("X11 specific test", SkipAll);
#endif