diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2010-03-26 21:36:34 (GMT) |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2010-03-26 21:36:34 (GMT) |
commit | 8db35fe685d115f136bb2ec0305300dd082b278b (patch) | |
tree | f37077d6bee42a709ff31553dfc4fa5b124e385d /tests/auto | |
parent | 0e7a43dba248030c673be5deab8ca70d14c0798f (diff) | |
download | Qt-8db35fe685d115f136bb2ec0305300dd082b278b.zip Qt-8db35fe685d115f136bb2ec0305300dd082b278b.tar.gz Qt-8db35fe685d115f136bb2ec0305300dd082b278b.tar.bz2 |
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')
-rw-r--r-- | tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp index 841f5b9..018c036 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 |