diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2009-11-04 14:34:29 (GMT) |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2009-11-04 14:36:53 (GMT) |
commit | 106148704ee1e73c7b71c4a1a2dcb64a1ac52727 (patch) | |
tree | db282a194362c6254ed93fb3149a5efa022cede8 /src/3rdparty/harfbuzz/tests/shaping | |
parent | d14cf629997e6cfc454af257f6f0df8ce5224363 (diff) | |
download | Qt-106148704ee1e73c7b71c4a1a2dcb64a1ac52727.zip Qt-106148704ee1e73c7b71c4a1a2dcb64a1ac52727.tar.gz Qt-106148704ee1e73c7b71c4a1a2dcb64a1ac52727.tar.bz2 |
update harfbuzz to the latest version from fd.org
This corresponds to commit e8a057fb67a0242e5a125d8cb2c823ad63e01449
in harfbuzz.
The changes include fixes for an out of bounds read and QTBUG-5293.
Task-Number: QTBUG-5293
Reviewed-by: Eskil
Diffstat (limited to 'src/3rdparty/harfbuzz/tests/shaping')
-rw-r--r-- | src/3rdparty/harfbuzz/tests/shaping/main.cpp | 76 |
1 files changed, 66 insertions, 10 deletions
diff --git a/src/3rdparty/harfbuzz/tests/shaping/main.cpp b/src/3rdparty/harfbuzz/tests/shaping/main.cpp index 1a3ef4f..a7ea417 100644 --- a/src/3rdparty/harfbuzz/tests/shaping/main.cpp +++ b/src/3rdparty/harfbuzz/tests/shaping/main.cpp @@ -178,7 +178,7 @@ private slots: void telugu(); void kannada(); void malayalam(); - // sinhala missing + void sinhala(); void khmer(); void linearB(); @@ -510,6 +510,11 @@ void tst_QScriptEngine::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} } }; @@ -638,15 +643,15 @@ void tst_QScriptEngine::bengali() if (face) { const ShapeTable shape_table [] = { { { 0x09a8, 0x09cd, 0x09af, 0x0 }, - { 0x0192, 0x0 } }, + { 0x01ca, 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} } }; @@ -823,8 +828,9 @@ void tst_QScriptEngine::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} } }; const ShapeTable *s = shape_table; @@ -867,7 +873,6 @@ void tst_QScriptEngine::kannada() { 0x0036, 0x00c1, 0x0 } }, { { 0x0cb0, 0x0ccd, 0x200d, 0x0c95, 0x0 }, { 0x0050, 0x00a7, 0x0 } }, - { {0}, {0} } }; @@ -891,6 +896,17 @@ void tst_QScriptEngine::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} } }; @@ -943,7 +959,14 @@ void tst_QScriptEngine::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} } }; @@ -962,6 +985,39 @@ void tst_QScriptEngine::malayalam() } } +void tst_QScriptEngine::sinhala() +{ + { + FT_Face face = loadFace("FM-MalithiUW46.ttf"); + if (face) { + 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(face, s, HB_Script_Sinhala) ); + ++s; + } + + FT_Done_Face(face); + } else { + QSKIP("couln't find FM-MalithiUW46.ttf", SkipAll); + } + } +} void tst_QScriptEngine::khmer() |