summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp')
-rw-r--r--tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp87
1 files changed, 75 insertions, 12 deletions
diff --git a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
index 226348a79d..78e0ce6a83 100644
--- a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -98,7 +98,7 @@ private slots:
void telugu();
void kannada();
void malayalam();
- // sinhala missing
+ void sinhala();
void khmer();
void linearB();
@@ -379,7 +379,11 @@ void tst_QTextScriptEngine::bengali()
{ 0x151, 0x276, 0x172, 0x143, 0x0 } },
{ { 0x9b0, 0x9cd, 0x995, 0x9be, 0x983, 0x0 },
{ 0x151, 0x276, 0x172, 0x144, 0x0 } },
-
+ // test decomposed two parts matras
+ { { 0x995, 0x9c7, 0x9be, 0x0 },
+ { 0x179, 0x151, 0x172, 0x0 } },
+ { { 0x995, 0x9c7, 0x9d7, 0x0 },
+ { 0x179, 0x151, 0x17e, 0x0 } },
{ {0}, {0} }
};
@@ -502,16 +506,16 @@ void tst_QTextScriptEngine::bengali()
if (QFontDatabase().families(QFontDatabase::Bengali).contains("Likhan")) {
QFont f("Likhan");
const ShapeTable shape_table [] = {
- { { 0x09a8, 0x09cd, 0x09af, 0x0 },
- { 0x0192, 0x0 } },
+ { { 0x9a8, 0x9cd, 0x9af, 0x0 },
+ { 0x1ca, 0x0 } },
{ { 0x09b8, 0x09cd, 0x09af, 0x0 },
- { 0x01d6, 0x0 } },
+ { 0x020e, 0x0 } },
{ { 0x09b6, 0x09cd, 0x09af, 0x0 },
- { 0x01bc, 0x0 } },
+ { 0x01f4, 0x0 } },
{ { 0x09b7, 0x09cd, 0x09af, 0x0 },
- { 0x01c6, 0x0 } },
+ { 0x01fe, 0x0 } },
{ { 0x09b0, 0x09cd, 0x09a8, 0x09cd, 0x200d, 0x0 },
- { 0xd3, 0x12f, 0x0 } },
+ { 0x10b, 0x167, 0x0 } },
{ {0}, {0} }
};
@@ -647,6 +651,12 @@ void tst_QTextScriptEngine::tamil()
{ 0x0025, 0x0 } },
{ { 0x0b83, 0x0b95, 0x0 },
{ 0x0025, 0x0031, 0x0 } },
+ { { 0xb95, 0xbc6, 0xbbe, 0x0 },
+ { 0xa, 0x31, 0x7, 0x0 } },
+ { { 0xb95, 0xbc7, 0xbbe, 0x0 },
+ { 0xb, 0x31, 0x7, 0x0 } },
+ { { 0xb95, 0xbc6, 0xbd7, 0x0 },
+ { 0xa, 0x31, 0x40, 0x0 } },
{ {0}, {0} }
};
@@ -694,7 +704,9 @@ void tst_QTextScriptEngine::telugu()
{ 0xe6, 0xb3, 0x83, 0x0 } },
{ { 0xc15, 0xc4d, 0xc30, 0xc48, 0x0 },
{ 0xe6, 0xb3, 0x9f, 0x0 } },
- { {0}, {0} }
+ { { 0xc15, 0xc46, 0xc56, 0x0 },
+ { 0xe6, 0xb3, 0x0 } },
+ { {0}, {0} }
};
@@ -762,7 +774,16 @@ void tst_QTextScriptEngine::kannada()
{ 0x00b0, 0x006c, 0x0 } },
{ { 0x0cb7, 0x0ccd, 0x0 },
{ 0x0163, 0x0 } },
-
+ { { 0xc95, 0xcbf, 0xcd5, 0x0 },
+ { 0x114, 0x73, 0x0 } },
+ { { 0xc95, 0xcc6, 0xcd5, 0x0 },
+ { 0x90, 0x6c, 0x73, 0x0 } },
+ { { 0xc95, 0xcc6, 0xcd6, 0x0 },
+ { 0x90, 0x6c, 0x74, 0x0 } },
+ { { 0xc95, 0xcc6, 0xcc2, 0x0 },
+ { 0x90, 0x6c, 0x69, 0x0 } },
+ { { 0xc95, 0xcca, 0xcd5, 0x0 },
+ { 0x90, 0x6c, 0x69, 0x73, 0x0 } },
{ {0}, {0} }
};
@@ -816,8 +837,14 @@ void tst_QTextScriptEngine::malayalam()
{ 0x009e, 0x0 } },
{ { 0x0d30, 0x0d4d, 0x200d, 0x0 },
{ 0x009e, 0x0 } },
-
-
+ { { 0xd15, 0xd46, 0xd3e, 0x0 },
+ { 0x5e, 0x34, 0x58, 0x0 } },
+ { { 0xd15, 0xd47, 0xd3e, 0x0 },
+ { 0x5f, 0x34, 0x58, 0x0 } },
+ { { 0xd15, 0xd46, 0xd57, 0x0 },
+ { 0x5e, 0x34, 0x65, 0x0 } },
+ { { 0xd15, 0xd57, 0x0 },
+ { 0x34, 0x65, 0x0 } },
{ {0}, {0} }
};
@@ -836,6 +863,42 @@ void tst_QTextScriptEngine::malayalam()
#endif
}
+void tst_QTextScriptEngine::sinhala()
+{
+#if defined(Q_WS_X11)
+ {
+ if (QFontDatabase().families(QFontDatabase::Sinhala).contains("Malithi Web")) {
+ QFont f("Malithi Web");
+ const ShapeTable shape_table [] = {
+ { { 0xd9a, 0xdd9, 0xdcf, 0x0 },
+ { 0x4a, 0x61, 0x42, 0x0 } },
+ { { 0xd9a, 0xdd9, 0xddf, 0x0 },
+ { 0x4a, 0x61, 0x50, 0x0 } },
+ { { 0xd9a, 0xdd9, 0xdca, 0x0 },
+ { 0x4a, 0x62, 0x0 } },
+ { { 0xd9a, 0xddc, 0xdca, 0x0 },
+ { 0x4a, 0x61, 0x42, 0x41, 0x0 } },
+ { { 0xd9a, 0xdda, 0x0 },
+ { 0x4a, 0x62, 0x0 } },
+ { { 0xd9a, 0xddd, 0x0 },
+ { 0x4a, 0x61, 0x42, 0x41, 0x0 } },
+ { {0}, {0} }
+ };
+
+
+ const ShapeTable *s = shape_table;
+ while (s->unicode[0]) {
+ QVERIFY( shaping(f, s) );
+ ++s;
+ }
+ } else {
+ QSKIP("couln't find Malithi Web", SkipAll);
+ }
+ }
+#else
+ QSKIP("X11 specific test", SkipAll);
+#endif
+}
void tst_QTextScriptEngine::khmer()