aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-04-24 23:18:43 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-05-11 18:04:08 +0000
commitffec3f8b1786865b8eb38e3ed1ceb3a4bc5427ba (patch)
treecfa6c199d1b860347139181a3efec7449638915f /tests/auto
parent28e33e5b97ca20a516f6c5aded7dab508033cf46 (diff)
Add Vietnamese handwriting recognition (T9 Write)
[ChangeLog] Added Vietnamese handwriting recognition. Change-Id: I34fcf6acf58c3fcc8ef131db9c0f34703a7f85fc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/inputpanel/data/inputpanel/handwriting.js7
-rw-r--r--tests/auto/inputpanel/data/inputpanel/inputpanel.qml3
-rw-r--r--tests/auto/inputpanel/data/inputpanel/unipen_data_vietnamese.js1930
-rw-r--r--tests/auto/inputpanel/data/tst_inputpanel.qml1
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/103_100_0.txt89
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_0.txt41
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_1.txt29
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/110_100_0.txt82
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/116_100_0.txt72
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/7871_100_0.txt88
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/7879_100_0.txt71
11 files changed, 2410 insertions, 3 deletions
diff --git a/tests/auto/inputpanel/data/inputpanel/handwriting.js b/tests/auto/inputpanel/data/inputpanel/handwriting.js
index a4c4ec1a..0721f141 100644
--- a/tests/auto/inputpanel/data/inputpanel/handwriting.js
+++ b/tests/auto/inputpanel/data/inputpanel/handwriting.js
@@ -38,14 +38,17 @@
.import "unipen_data_cyrillic.js" as UnipenDataCyrillic
.import "unipen_data_arabic.js" as UnipenDataArabic
.import "unipen_data_hebrew.js" as UnipenDataHebrew
+.import "unipen_data_vietnamese.js" as UnipenDataVietnamese
-function emulate(testcase, hwrInputArea, ch, instant) {
+function emulate(testcase, hwrInputArea, ch, instant, locale) {
var chKey = (((typeof ch == "number") ? ch : ch.charCodeAt(0)) + 0x100000000).toString(16).substr(1)
while (chKey.length > 4 && chKey[0] === '0')
chKey = chKey.substring(1)
chKey = "0x" + chKey
var unipenData
- if (UnipenData.unipenData.hasOwnProperty(chKey))
+ if (locale === "vi_VN" && UnipenDataVietnamese.unipenData.hasOwnProperty(chKey))
+ unipenData = UnipenDataVietnamese
+ else if (UnipenData.unipenData.hasOwnProperty(chKey))
unipenData = UnipenData
else if (UnipenDataSimpChinese.unipenData.hasOwnProperty(chKey))
unipenData = UnipenDataSimpChinese
diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
index 8b61bd89..6a5ae429 100644
--- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
+++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
@@ -593,7 +593,8 @@ InputPanel {
return false
var hwrInputArea = Utils.findChildByProperty(keyboard, "objectName", "hwrInputArea", null)
inputMethodResultSpy.clear()
- if (!Handwriting.emulate(testcase, hwrInputArea, ch, instant)) {
+ if (!Handwriting.emulate(testcase, hwrInputArea, ch, instant,
+ VirtualKeyboardSettings.locale)) {
if (virtualKeyClick(ch))
return true
console.warn("Cannot produce the symbol '%1' in handwriting mode".arg(ch))
diff --git a/tests/auto/inputpanel/data/inputpanel/unipen_data_vietnamese.js b/tests/auto/inputpanel/data/inputpanel/unipen_data_vietnamese.js
new file mode 100644
index 00000000..09d2fae6
--- /dev/null
+++ b/tests/auto/inputpanel/data/inputpanel/unipen_data_vietnamese.js
@@ -0,0 +1,1930 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+var unipenData = {
+ "0x0067": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 493,
+ 87,
+ 0
+ ],
+ [
+ 492,
+ 86,
+ 57
+ ],
+ [
+ 488,
+ 84,
+ 87
+ ],
+ [
+ 484,
+ 83,
+ 150
+ ],
+ [
+ 480,
+ 83,
+ 152
+ ],
+ [
+ 473,
+ 83,
+ 212
+ ],
+ [
+ 462,
+ 85,
+ 215
+ ],
+ [
+ 454,
+ 89,
+ 271
+ ],
+ [
+ 452,
+ 92,
+ 273
+ ],
+ [
+ 451,
+ 94,
+ 274
+ ],
+ [
+ 449,
+ 99,
+ 332
+ ],
+ [
+ 445,
+ 109,
+ 333
+ ],
+ [
+ 443,
+ 114,
+ 337
+ ],
+ [
+ 442,
+ 120,
+ 394
+ ],
+ [
+ 442,
+ 132,
+ 395
+ ],
+ [
+ 442,
+ 144,
+ 455
+ ],
+ [
+ 444,
+ 159,
+ 458
+ ],
+ [
+ 446,
+ 167,
+ 522
+ ],
+ [
+ 448,
+ 175,
+ 524
+ ],
+ [
+ 450,
+ 178,
+ 577
+ ],
+ [
+ 450,
+ 179,
+ 578
+ ],
+ [
+ 451,
+ 180,
+ 640
+ ],
+ [
+ 454,
+ 181,
+ 642
+ ],
+ [
+ 455,
+ 182,
+ 699
+ ],
+ [
+ 456,
+ 183,
+ 701
+ ],
+ [
+ 460,
+ 185,
+ 760
+ ],
+ [
+ 463,
+ 185,
+ 762
+ ],
+ [
+ 466,
+ 186,
+ 823
+ ],
+ [
+ 469,
+ 186,
+ 825
+ ],
+ [
+ 474,
+ 183,
+ 883
+ ],
+ [
+ 487,
+ 179,
+ 884
+ ],
+ [
+ 496,
+ 173,
+ 944
+ ],
+ [
+ 502,
+ 162,
+ 945
+ ],
+ [
+ 509,
+ 144,
+ 1011
+ ],
+ [
+ 514,
+ 133,
+ 1013
+ ],
+ [
+ 514,
+ 124,
+ 1069
+ ],
+ [
+ 514,
+ 118,
+ 1070
+ ],
+ [
+ 514,
+ 113,
+ 1073
+ ],
+ [
+ 512,
+ 108,
+ 1125
+ ],
+ [
+ 509,
+ 100,
+ 1125
+ ],
+ [
+ 507,
+ 97,
+ 1185
+ ],
+ [
+ 506,
+ 94,
+ 1186
+ ],
+ [
+ 506,
+ 92,
+ 1247
+ ],
+ [
+ 505,
+ 90,
+ 1248
+ ],
+ [
+ 504,
+ 89,
+ 1310
+ ],
+ [
+ 504,
+ 88,
+ 1312
+ ],
+ [
+ 504,
+ 90,
+ 1571
+ ],
+ [
+ 506,
+ 95,
+ 1616
+ ],
+ [
+ 507,
+ 101,
+ 1618
+ ],
+ [
+ 511,
+ 117,
+ 1675
+ ],
+ [
+ 512,
+ 130,
+ 1676
+ ],
+ [
+ 514,
+ 145,
+ 1738
+ ],
+ [
+ 514,
+ 158,
+ 1740
+ ],
+ [
+ 514,
+ 165,
+ 1797
+ ],
+ [
+ 514,
+ 177,
+ 1799
+ ],
+ [
+ 514,
+ 182,
+ 1802
+ ],
+ [
+ 514,
+ 187,
+ 1860
+ ],
+ [
+ 513,
+ 193,
+ 1862
+ ],
+ [
+ 513,
+ 198,
+ 1922
+ ],
+ [
+ 512,
+ 200,
+ 1924
+ ],
+ [
+ 512,
+ 202,
+ 1981
+ ],
+ [
+ 512,
+ 206,
+ 1983
+ ],
+ [
+ 511,
+ 207,
+ 2043
+ ],
+ [
+ 511,
+ 209,
+ 2044
+ ],
+ [
+ 511,
+ 211,
+ 2045
+ ],
+ [
+ 511,
+ 212,
+ 2050
+ ],
+ [
+ 511,
+ 214,
+ 2106
+ ],
+ [
+ 510,
+ 217,
+ 2167
+ ],
+ [
+ 510,
+ 218,
+ 2169
+ ],
+ [
+ 508,
+ 220,
+ 2170
+ ],
+ [
+ 507,
+ 222,
+ 2228
+ ],
+ [
+ 503,
+ 226,
+ 2230
+ ],
+ [
+ 500,
+ 227,
+ 2234
+ ],
+ [
+ 499,
+ 229,
+ 2290
+ ],
+ [
+ 491,
+ 232,
+ 2293
+ ],
+ [
+ 480,
+ 233,
+ 2349
+ ],
+ [
+ 466,
+ 234,
+ 2350
+ ],
+ [
+ 458,
+ 235,
+ 2411
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ },
+ "0x0069": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 538,
+ 83,
+ 0
+ ],
+ [
+ 538,
+ 86,
+ 83
+ ],
+ [
+ 538,
+ 88,
+ 96
+ ],
+ [
+ 538,
+ 92,
+ 147
+ ],
+ [
+ 538,
+ 105,
+ 148
+ ],
+ [
+ 538,
+ 129,
+ 203
+ ],
+ [
+ 537,
+ 141,
+ 204
+ ],
+ [
+ 534,
+ 170,
+ 264
+ ],
+ [
+ 532,
+ 182,
+ 265
+ ],
+ [
+ 532,
+ 191,
+ 327
+ ],
+ [
+ 532,
+ 197,
+ 329
+ ],
+ [
+ 532,
+ 198,
+ 388
+ ],
+ [
+ 532,
+ 200,
+ 390
+ ],
+ [
+ 532,
+ 198,
+ 764
+ ],
+ [
+ 532,
+ 194,
+ 812
+ ]
+ ],
+ [
+ [
+ 533,
+ 58,
+ 1292
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ },
+ "0x006e": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 400,
+ 82,
+ 0
+ ],
+ [
+ 400,
+ 83,
+ 85
+ ],
+ [
+ 400,
+ 85,
+ 96
+ ],
+ [
+ 400,
+ 96,
+ 153
+ ],
+ [
+ 401,
+ 103,
+ 156
+ ],
+ [
+ 402,
+ 113,
+ 157
+ ],
+ [
+ 402,
+ 124,
+ 215
+ ],
+ [
+ 402,
+ 147,
+ 217
+ ],
+ [
+ 402,
+ 161,
+ 221
+ ],
+ [
+ 402,
+ 173,
+ 275
+ ],
+ [
+ 402,
+ 188,
+ 278
+ ],
+ [
+ 400,
+ 198,
+ 342
+ ],
+ [
+ 399,
+ 202,
+ 344
+ ],
+ [
+ 399,
+ 204,
+ 345
+ ],
+ [
+ 399,
+ 205,
+ 396
+ ],
+ [
+ 399,
+ 204,
+ 526
+ ],
+ [
+ 399,
+ 200,
+ 580
+ ],
+ [
+ 399,
+ 191,
+ 582
+ ],
+ [
+ 399,
+ 185,
+ 641
+ ],
+ [
+ 401,
+ 170,
+ 643
+ ],
+ [
+ 402,
+ 162,
+ 644
+ ],
+ [
+ 403,
+ 153,
+ 701
+ ],
+ [
+ 404,
+ 132,
+ 703
+ ],
+ [
+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 192,
+ 2131
+ ],
+ [
+ 445,
+ 193,
+ 2193
+ ],
+ [
+ 445,
+ 194,
+ 2195
+ ],
+ [
+ 445,
+ 195,
+ 2413
+ ],
+ [
+ 445,
+ 196,
+ 2477
+ ],
+ [
+ 445,
+ 197,
+ 2527
+ ],
+ [
+ 445,
+ 198,
+ 2528
+ ],
+ [
+ 445,
+ 199,
+ 2587
+ ],
+ [
+ 445,
+ 200,
+ 2588
+ ],
+ [
+ 445,
+ 201,
+ 2648
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ },
+ "0x0074": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 639,
+ 167,
+ 0
+ ],
+ [
+ 640,
+ 167,
+ 50
+ ],
+ [
+ 640,
+ 164,
+ 76
+ ],
+ [
+ 645,
+ 154,
+ 136
+ ],
+ [
+ 653,
+ 135,
+ 137
+ ],
+ [
+ 662,
+ 108,
+ 203
+ ],
+ [
+ 666,
+ 87,
+ 205
+ ],
+ [
+ 666,
+ 73,
+ 257
+ ],
+ [
+ 666,
+ 67,
+ 259
+ ],
+ [
+ 666,
+ 62,
+ 318
+ ],
+ [
+ 666,
+ 60,
+ 319
+ ],
+ [
+ 666,
+ 58,
+ 380
+ ],
+ [
+ 665,
+ 57,
+ 381
+ ],
+ [
+ 665,
+ 56,
+ 440
+ ],
+ [
+ 664,
+ 57,
+ 505
+ ],
+ [
+ 664,
+ 58,
+ 507
+ ],
+ [
+ 663,
+ 61,
+ 561
+ ],
+ [
+ 663,
+ 66,
+ 562
+ ],
+ [
+ 662,
+ 75,
+ 622
+ ],
+ [
+ 661,
+ 86,
+ 623
+ ],
+ [
+ 660,
+ 98,
+ 688
+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 689,
+ 77,
+ 2211
+ ],
+ [
+ 690,
+ 77,
+ 2267
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ },
+ "0x1ebf": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 294,
+ 112,
+ 0
+ ],
+ [
+ 297,
+ 112,
+ 117
+ ],
+ [
+ 299,
+ 113,
+ 134
+ ],
+ [
+ 305,
+ 114,
+ 141
+ ],
+ [
+ 311,
+ 115,
+ 176
+ ],
+ [
+ 318,
+ 115,
+ 177
+ ],
+ [
+ 325,
+ 116,
+ 237
+ ],
+ [
+ 330,
+ 116,
+ 238
+ ],
+ [
+ 340,
+ 116,
+ 297
+ ],
+ [
+ 350,
+ 116,
+ 299
+ ],
+ [
+ 352,
+ 116,
+ 358
+ ],
+ [
+ 352,
+ 111,
+ 360
+ ],
+ [
+ 353,
+ 104,
+ 419
+ ],
+ [
+ 353,
+ 98,
+ 420
+ ],
+ [
+ 353,
+ 94,
+ 481
+ ],
+ [
+ 347,
+ 87,
+ 483
+ ],
+ [
+ 337,
+ 81,
+ 541
+ ],
+ [
+ 334,
+ 79,
+ 543
+ ],
+ [
+ 330,
+ 78,
+ 572
+ ],
+ [
+ 329,
+ 78,
+ 606
+ ],
+ [
+ 320,
+ 78,
+ 607
+ ],
+ [
+ 314,
+ 78,
+ 662
+ ],
+ [
+ 303,
+ 80,
+ 663
+ ],
+ [
+ 301,
+ 82,
+ 667
+ ],
+ [
+ 299,
+ 84,
+ 723
+ ],
+ [
+ 292,
+ 93,
+ 725
+ ],
+ [
+ 289,
+ 97,
+ 783
+ ],
+ [
+ 284,
+ 108,
+ 786
+ ],
+ [
+ 282,
+ 114,
+ 788
+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+ 62,
+ 4443
+ ],
+ [
+ 343,
+ 59,
+ 4471
+ ],
+ [
+ 348,
+ 56,
+ 4532
+ ],
+ [
+ 352,
+ 51,
+ 4535
+ ],
+ [
+ 355,
+ 47,
+ 4593
+ ],
+ [
+ 356,
+ 45,
+ 4594
+ ],
+ [
+ 357,
+ 44,
+ 4595
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ },
+ "0x1ec7": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 561,
+ 107,
+ 0
+ ],
+ [
+ 564,
+ 107,
+ 60
+ ],
+ [
+ 571,
+ 109,
+ 76
+ ],
+ [
+ 583,
+ 109,
+ 128
+ ],
+ [
+ 608,
+ 111,
+ 129
+ ],
+ [
+ 620,
+ 111,
+ 186
+ ],
+ [
+ 632,
+ 109,
+ 187
+ ],
+ [
+ 634,
+ 106,
+ 188
+ ],
+ [
+ 635,
+ 100,
+ 246
+ ],
+ [
+ 632,
+ 93,
+ 246
+ ],
+ [
+ 624,
+ 87,
+ 306
+ ],
+ [
+ 619,
+ 86,
+ 307
+ ],
+ [
+ 614,
+ 85,
+ 308
+ ],
+ [
+ 608,
+ 85,
+ 367
+ ],
+ [
+ 594,
+ 87,
+ 368
+ ],
+ [
+ 587,
+ 90,
+ 371
+ ],
+ [
+ 582,
+ 94,
+ 437
+ ],
+ [
+ 564,
+ 110,
+ 438
+ ],
+ [
+ 559,
+ 117,
+ 489
+ ],
+ [
+ 554,
+ 132,
+ 490
+ ],
+ [
+ 554,
+ 149,
+ 550
+ ],
+ [
+ 559,
+ 161,
+ 551
+ ],
+ [
+ 562,
+ 164,
+ 611
+ ],
+ [
+ 568,
+ 166,
+ 612
+ ],
+ [
+ 576,
+ 167,
+ 672
+ ],
+ [
+ 605,
+ 168,
+ 674
+ ],
+ [
+ 622,
+ 168,
+ 733
+ ],
+ [
+ 625,
+ 167,
+ 794
+ ],
+ [
+ 626,
+ 167,
+ 795
+ ],
+ [
+ 627,
+ 166,
+ 857
+ ],
+ [
+ 628,
+ 166,
+ 1029
+ ]
+ ],
+ [
+ [
+ 583,
+ 57,
+ 4161
+ ],
+ [
+ 584,
+ 57,
+ 4229
+ ],
+ [
+ 588,
+ 53,
+ 4231
+ ],
+ [
+ 592,
+ 49,
+ 4288
+ ],
+ [
+ 595,
+ 45,
+ 4289
+ ],
+ [
+ 599,
+ 42,
+ 4351
+ ],
+ [
+ 600,
+ 42,
+ 4353
+ ],
+ [
+ 601,
+ 41,
+ 4411
+ ],
+ [
+ 602,
+ 40,
+ 4476
+ ],
+ [
+ 603,
+ 39,
+ 4749
+ ],
+ [
+ 604,
+ 38,
+ 4836
+ ],
+ [
+ 605,
+ 38,
+ 4895
+ ],
+ [
+ 606,
+ 38,
+ 4900
+ ],
+ [
+ 607,
+ 38,
+ 5005
+ ],
+ [
+ 608,
+ 38,
+ 5149
+ ],
+ [
+ 609,
+ 38,
+ 5198
+ ],
+ [
+ 609,
+ 39,
+ 5199
+ ],
+ [
+ 613,
+ 51,
+ 5260
+ ],
+ [
+ 615,
+ 59,
+ 5261
+ ],
+ [
+ 616,
+ 65,
+ 5320
+ ],
+ [
+ 617,
+ 68,
+ 5321
+ ],
+ [
+ 617,
+ 69,
+ 5323
+ ],
+ [
+ 617,
+ 70,
+ 5382
+ ],
+ [
+ 618,
+ 71,
+ 5383
+ ]
+ ],
+ [
+ [
+ 594,
+ 188,
+ 6585
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ }
+}
diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml
index 229b1e96..29b0be52 100644
--- a/tests/auto/inputpanel/data/tst_inputpanel.qml
+++ b/tests/auto/inputpanel/data/tst_inputpanel.qml
@@ -1150,6 +1150,7 @@ Rectangle {
{ initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "ar_AR", initInputMode: "Arabic", inputSequence: "\u0643\u062A\u0627\u0628", outputText: "\u0643\u062A\u0627\u0628" },
{ initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "fa_FA", initInputMode: "Arabic", inputSequence: "\u0686\u0627\u06CC", outputText: "\u0686\u0627\u06CC" },
{ initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "he_IL", initInputMode: "Hebrew", inputSequence: "\u05D0\u05D5\u05D8\u05D5", outputText: "\u05D0\u05D5\u05D8\u05D5" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "vi_VN", inputSequence: "Ti\u1EBFng vi\u1EC7t", outputText: "Ti\u1EBFng vi\u1EC7t" },
]
}
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/103_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/103_100_0.txt
new file mode 100644
index 00000000..7208d774
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/103_100_0.txt
@@ -0,0 +1,89 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+493 87 0
+492 86 57
+488 84 87
+484 83 150
+480 83 152
+473 83 212
+462 85 215
+454 89 271
+452 92 273
+451 94 274
+449 99 332
+445 109 333
+443 114 337
+442 120 394
+442 132 395
+442 144 455
+444 159 458
+446 167 522
+448 175 524
+450 178 577
+450 179 578
+451 180 640
+454 181 642
+455 182 699
+456 183 701
+460 185 760
+463 185 762
+466 186 823
+469 186 825
+474 183 883
+487 179 884
+496 173 944
+502 162 945
+509 144 1011
+514 133 1013
+514 124 1069
+514 118 1070
+514 113 1073
+512 108 1125
+509 100 1125
+507 97 1185
+506 94 1186
+506 92 1247
+505 90 1248
+504 89 1310
+504 88 1312
+504 90 1571
+506 95 1616
+507 101 1618
+511 117 1675
+512 130 1676
+514 145 1738
+514 158 1740
+514 165 1797
+514 177 1799
+514 182 1802
+514 187 1860
+513 193 1862
+513 198 1922
+512 200 1924
+512 202 1981
+512 206 1983
+511 207 2043
+511 209 2044
+511 211 2045
+511 212 2050
+511 214 2106
+510 217 2167
+510 218 2169
+508 220 2170
+507 222 2228
+503 226 2230
+500 227 2234
+499 229 2290
+491 232 2293
+480 233 2349
+466 234 2350
+458 235 2411
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_0.txt
new file mode 100644
index 00000000..f8df0a97
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_0.txt
@@ -0,0 +1,41 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+255 93 0
+255 95 75
+255 97 92
+255 103 123
+255 105 124
+255 111 184
+255 125 185
+255 131 186
+255 138 245
+255 147 247
+256 153 306
+256 154 308
+256 155 366
+256 156 431
+256 158 432
+256 159 489
+256 160 490
+256 161 836
+256 162 885
+256 164 952
+256 165 954
+256 166 1007
+256 167 1143
+256 168 1188
+256 169 1249
+257 170 1309
+257 171 1400
+.PEN_UP
+.PEN_DOWN
+252 71 2545
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_1.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_1.txt
new file mode 100644
index 00000000..ce79ff6b
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_1.txt
@@ -0,0 +1,29 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+538 83 0
+538 86 83
+538 88 96
+538 92 147
+538 105 148
+538 129 203
+537 141 204
+534 170 264
+532 182 265
+532 191 327
+532 197 329
+532 198 388
+532 200 390
+532 198 764
+532 194 812
+.PEN_UP
+.PEN_DOWN
+533 58 1292
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/110_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/110_100_0.txt
new file mode 100644
index 00000000..ead63891
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/110_100_0.txt
@@ -0,0 +1,82 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+400 82 0
+400 83 85
+400 85 96
+400 96 153
+401 103 156
+402 113 157
+402 124 215
+402 147 217
+402 161 221
+402 173 275
+402 188 278
+400 198 342
+399 202 344
+399 204 345
+399 205 396
+399 204 526
+399 200 580
+399 191 582
+399 185 641
+401 170 643
+402 162 644
+403 153 701
+404 132 703
+407 118 761
+409 109 763
+411 104 764
+414 99 824
+415 98 827
+417 95 884
+418 93 886
+419 93 1125
+420 93 1183
+422 92 1185
+423 92 1216
+425 91 1277
+426 91 1337
+427 91 1338
+428 91 1340
+432 94 1399
+434 96 1400
+437 102 1430
+439 105 1460
+442 115 1461
+444 126 1520
+446 137 1521
+447 148 1581
+447 153 1582
+447 159 1642
+447 165 1643
+447 166 1645
+447 172 1703
+446 177 1764
+446 179 1765
+446 180 1853
+446 181 1891
+446 183 1947
+446 185 1950
+446 186 2007
+446 188 2008
+446 189 2069
+445 191 2070
+445 192 2131
+445 193 2193
+445 194 2195
+445 195 2413
+445 196 2477
+445 197 2527
+445 198 2528
+445 199 2587
+445 200 2588
+445 201 2648
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/116_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/116_100_0.txt
new file mode 100644
index 00000000..dc06a8b8
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/116_100_0.txt
@@ -0,0 +1,72 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+639 167 0
+640 167 50
+640 164 76
+645 154 136
+653 135 137
+662 108 203
+666 87 205
+666 73 257
+666 67 259
+666 62 318
+666 60 319
+666 58 380
+665 57 381
+665 56 440
+664 57 505
+664 58 507
+663 61 561
+663 66 562
+662 75 622
+661 86 623
+660 98 688
+659 111 689
+659 114 690
+659 121 745
+659 132 746
+659 141 805
+659 149 806
+659 158 868
+660 161 870
+661 164 929
+661 165 990
+662 166 992
+663 167 1131
+663 165 1483
+663 159 1535
+664 156 1536
+664 151 1538
+665 146 1595
+666 136 1596
+666 127 1659
+666 116 1662
+665 111 1667
+663 105 1723
+656 96 1724
+652 93 1781
+648 92 1783
+643 90 1786
+639 89 1840
+633 88 1841
+632 87 1971
+632 86 2023
+636 85 2023
+641 84 2024
+647 82 2026
+655 81 2084
+668 79 2085
+682 77 2148
+686 77 2150
+688 77 2154
+689 77 2211
+690 77 2267
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/7871_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/7871_100_0.txt
new file mode 100644
index 00000000..70f7d412
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/7871_100_0.txt
@@ -0,0 +1,88 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+294 112 0
+297 112 117
+299 113 134
+305 114 141
+311 115 176
+318 115 177
+325 116 237
+330 116 238
+340 116 297
+350 116 299
+352 116 358
+352 111 360
+353 104 419
+353 98 420
+353 94 481
+347 87 483
+337 81 541
+334 79 543
+330 78 572
+329 78 606
+320 78 607
+314 78 662
+303 80 663
+301 82 667
+299 84 723
+292 93 725
+289 97 783
+284 108 786
+282 114 788
+282 121 843
+282 134 845
+285 145 903
+288 153 906
+292 159 966
+293 161 968
+295 165 972
+296 165 1026
+299 168 1027
+304 170 1092
+311 173 1093
+314 173 1095
+323 174 1151
+331 175 1153
+343 176 1213
+353 176 1215
+357 175 1273
+359 172 1275
+359 171 1334
+360 171 2556
+.PEN_UP
+.PEN_DOWN
+306 67 3105
+306 64 3162
+307 63 3164
+309 62 3219
+314 56 3221
+320 47 3281
+323 43 3283
+325 40 3285
+326 40 3412
+327 41 3462
+327 43 3463
+328 47 3467
+329 51 3522
+330 59 3523
+330 62 3586
+331 62 4012
+.PEN_UP
+.PEN_DOWN
+338 62 4380
+340 62 4443
+343 59 4471
+348 56 4532
+352 51 4535
+355 47 4593
+356 45 4594
+357 44 4595
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/7879_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/7879_100_0.txt
new file mode 100644
index 00000000..c4d988de
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/7879_100_0.txt
@@ -0,0 +1,71 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+561 107 0
+564 107 60
+571 109 76
+583 109 128
+608 111 129
+620 111 186
+632 109 187
+634 106 188
+635 100 246
+632 93 246
+624 87 306
+619 86 307
+614 85 308
+608 85 367
+594 87 368
+587 90 371
+582 94 437
+564 110 438
+559 117 489
+554 132 490
+554 149 550
+559 161 551
+562 164 611
+568 166 612
+576 167 672
+605 168 674
+622 168 733
+625 167 794
+626 167 795
+627 166 857
+628 166 1029
+.PEN_UP
+.PEN_DOWN
+583 57 4161
+584 57 4229
+588 53 4231
+592 49 4288
+595 45 4289
+599 42 4351
+600 42 4353
+601 41 4411
+602 40 4476
+603 39 4749
+604 38 4836
+605 38 4895
+606 38 4900
+607 38 5005
+608 38 5149
+609 38 5198
+609 39 5199
+613 51 5260
+615 59 5261
+616 65 5320
+617 68 5321
+617 69 5323
+617 70 5382
+618 71 5383
+.PEN_UP
+.PEN_DOWN
+594 188 6585
+.PEN_UP