aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/virtualkeyboard/content/layouts/zh_TW/handwriting.qml116
-rw-r--r--src/virtualkeyboard/content/layouts/zh_TW/main.qml6
-rw-r--r--src/virtualkeyboard/t9writeinputmethod.cpp2
-rw-r--r--src/virtualkeyboard/virtualkeyboard.pro2
-rw-r--r--tests/auto/inputpanel/data/inputpanel/handwriting.js3
-rw-r--r--tests/auto/inputpanel/data/inputpanel/unipen_data_trad_chinese.js1310
-rw-r--r--tests/auto/inputpanel/data/tst_inputpanel.qml1
-rw-r--r--tests/auto/inputpanel/hwr_test_data/trad_chinese/22283_100_0.txt279
8 files changed, 1719 insertions, 0 deletions
diff --git a/src/virtualkeyboard/content/layouts/zh_TW/handwriting.qml b/src/virtualkeyboard/content/layouts/zh_TW/handwriting.qml
new file mode 100644
index 00000000..598980d1
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/zh_TW/handwriting.qml
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 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$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.VirtualKeyboard 2.3
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.VirtualKeyboard 2.3; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: preferredInputMode()
+
+ Connections {
+ target: InputContext
+ onInputMethodHintsChanged: {
+ var newInputMode = preferredInputMode()
+ if (InputContext.inputEngine.inputModes.indexOf(newInputMode) !== -1)
+ InputContext.inputEngine.inputMode = newInputMode
+ }
+ }
+
+ function preferredInputMode() {
+ return InputContext.inputMethodHints &
+ (Qt.ImhPreferLatin | Qt.ImhEmailCharactersOnly | Qt.ImhUrlCharactersOnly |
+ Qt.ImhLatinOnly) ? InputEngine.Latin : InputEngine.ChineseHandwriting
+ }
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ horizontalRulers:
+ InputContext.inputEngine.inputMode !== InputEngine.ChineseHandwriting ? [] :
+ [Math.round(boundingBox.height / 4), Math.round(boundingBox.height / 4) * 2, Math.round(boundingBox.height / 4) * 3]
+
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ InputModeKey {
+ weight: 217
+ }
+ ChangeLanguageKey {
+ weight: 154
+ customLayoutsOnly: true
+ }
+ HandwritingModeKey {
+ weight: 154
+ }
+ SpaceKey {
+ weight: 864
+ }
+ Key {
+ key: Qt.Key_Apostrophe
+ text: "‘"
+ alternativeKeys: "《》〈〉•…々〆‘’“”「」¥"
+ }
+ Key {
+ key: Qt.Key_Period
+ text: "."
+ alternativeKeys: ":;,.、。?!"
+ }
+ HideKeyboardKey {
+ id: hideKeyboardKey
+ weight: 204
+ }
+ }
+}
diff --git a/src/virtualkeyboard/content/layouts/zh_TW/main.qml b/src/virtualkeyboard/content/layouts/zh_TW/main.qml
index 25108389..2aa36ed2 100644
--- a/src/virtualkeyboard/content/layouts/zh_TW/main.qml
+++ b/src/virtualkeyboard/content/layouts/zh_TW/main.qml
@@ -197,6 +197,9 @@ KeyboardLayoutLoader {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
InputModeKey {
visible: InputContext.inputEngine.inputModes.indexOf(InputEngine.Zhuyin) !== -1
}
@@ -420,6 +423,9 @@ KeyboardLayoutLoader {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
InputModeKey {
visible: InputContext.inputEngine.inputModes.indexOf(InputEngine.Cangjie) !== -1
}
diff --git a/src/virtualkeyboard/t9writeinputmethod.cpp b/src/virtualkeyboard/t9writeinputmethod.cpp
index 3028d7d0..ee69d49d 100644
--- a/src/virtualkeyboard/t9writeinputmethod.cpp
+++ b/src/virtualkeyboard/t9writeinputmethod.cpp
@@ -616,6 +616,8 @@ public:
if (language == DECUMA_LANG_PRC) {
if (inputMode != InputEngine::ChineseHandwriting)
language = DECUMA_LANG_EN;
+ else if (locale.script() == QLocale::TraditionalChineseScript)
+ language = (locale.country() == QLocale::HongKong) ? DECUMA_LANG_HK : DECUMA_LANG_TW;
}
return language;
diff --git a/src/virtualkeyboard/virtualkeyboard.pro b/src/virtualkeyboard/virtualkeyboard.pro
index e16eaba9..cfbd55c7 100644
--- a/src/virtualkeyboard/virtualkeyboard.pro
+++ b/src/virtualkeyboard/virtualkeyboard.pro
@@ -202,6 +202,8 @@ contains(CONFIG, lang-zh(_TW)?) {
LAYOUT_FILES += \
content/layouts/zh_TW/main.qml \
content/layouts/zh_TW/symbols.qml
+t9write-cjk: LAYOUT_FILES += \
+ content/layouts/zh_TW/handwriting.qml
}
retro-style {
diff --git a/tests/auto/inputpanel/data/inputpanel/handwriting.js b/tests/auto/inputpanel/data/inputpanel/handwriting.js
index 7ec5e179..ac9e7a6f 100644
--- a/tests/auto/inputpanel/data/inputpanel/handwriting.js
+++ b/tests/auto/inputpanel/data/inputpanel/handwriting.js
@@ -31,6 +31,7 @@
.import "unipen_data.js" as UnipenData
.import "unipen_data_simp_chinese.js" as UnipenDataSimpChinese
+.import "unipen_data_trad_chinese.js" as UnipenDataTradChinese
function emulate(testcase, hwrInputArea, ch, instant) {
var chKey = (((typeof ch == "number") ? ch : ch.charCodeAt(0)) + 0x100000000).toString(16).substr(1)
@@ -42,6 +43,8 @@ function emulate(testcase, hwrInputArea, ch, instant) {
unipenData = UnipenData
else if (UnipenDataSimpChinese.unipenData.hasOwnProperty(chKey))
unipenData = UnipenDataSimpChinese
+ else if (UnipenDataTradChinese.unipenData.hasOwnProperty(chKey))
+ unipenData = UnipenDataTradChinese
else
return false
var chData = unipenData.unipenData[chKey]
diff --git a/tests/auto/inputpanel/data/inputpanel/unipen_data_trad_chinese.js b/tests/auto/inputpanel/data/inputpanel/unipen_data_trad_chinese.js
new file mode 100644
index 00000000..5e0c5c3f
--- /dev/null
+++ b/tests/auto/inputpanel/data/inputpanel/unipen_data_trad_chinese.js
@@ -0,0 +1,1310 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 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 = {
+ "0x570b": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 232,
+ 61,
+ 0
+ ],
+ [
+ 232,
+ 62,
+ 51
+ ],
+ [
+ 232,
+ 63,
+ 71
+ ],
+ [
+ 232,
+ 65,
+ 75
+ ],
+ [
+ 232,
+ 74,
+ 132
+ ],
+ [
+ 232,
+ 77,
+ 133
+ ],
+ [
+ 234,
+ 90,
+ 193
+ ],
+ [
+ 238,
+ 110,
+ 194
+ ],
+ [
+ 239,
+ 113,
+ 195
+ ],
+ [
+ 240,
+ 118,
+ 259
+ ],
+ [
+ 242,
+ 128,
+ 260
+ ],
+ [
+ 243,
+ 131,
+ 317
+ ],
+ [
+ 244,
+ 136,
+ 319
+ ],
+ [
+ 245,
+ 140,
+ 376
+ ],
+ [
+ 245,
+ 144,
+ 377
+ ],
+ [
+ 246,
+ 147,
+ 439
+ ],
+ [
+ 246,
+ 154,
+ 441
+ ],
+ [
+ 247,
+ 158,
+ 497
+ ],
+ [
+ 248,
+ 162,
+ 498
+ ],
+ [
+ 248,
+ 165,
+ 561
+ ],
+ [
+ 248,
+ 170,
+ 562
+ ],
+ [
+ 248,
+ 172,
+ 619
+ ],
+ [
+ 248,
+ 174,
+ 620
+ ],
+ [
+ 248,
+ 175,
+ 679
+ ],
+ [
+ 248,
+ 176,
+ 743
+ ],
+ [
+ 248,
+ 177,
+ 744
+ ],
+ [
+ 248,
+ 178,
+ 748
+ ],
+ [
+ 248,
+ 179,
+ 987
+ ]
+ ],
+ [
+ [
+ 229,
+ 61,
+ 2287
+ ],
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 267,
+ 148,
+ 9965
+ ],
+ [
+ 267,
+ 149,
+ 9966
+ ]
+ ],
+ [
+ [
+ 264,
+ 126,
+ 10655
+ ],
+ [
+ 267,
+ 126,
+ 10724
+ ],
+ [
+ 272,
+ 125,
+ 10741
+ ],
+ [
+ 277,
+ 125,
+ 10786
+ ],
+ [
+ 281,
+ 125,
+ 10787
+ ],
+ [
+ 287,
+ 125,
+ 10847
+ ],
+ [
+ 288,
+ 125,
+ 10848
+ ],
+ [
+ 291,
+ 124,
+ 10851
+ ],
+ [
+ 293,
+ 123,
+ 10915
+ ],
+ [
+ 293,
+ 125,
+ 11083
+ ],
+ [
+ 293,
+ 126,
+ 11149
+ ],
+ [
+ 293,
+ 130,
+ 11150
+ ],
+ [
+ 293,
+ 132,
+ 11155
+ ],
+ [
+ 293,
+ 135,
+ 11210
+ ],
+ [
+ 293,
+ 138,
+ 11211
+ ],
+ [
+ 293,
+ 139,
+ 11271
+ ],
+ [
+ 294,
+ 142,
+ 11272
+ ],
+ [
+ 294,
+ 143,
+ 11371
+ ],
+ [
+ 294,
+ 144,
+ 11425
+ ],
+ [
+ 294,
+ 145,
+ 11428
+ ],
+ [
+ 295,
+ 146,
+ 11484
+ ]
+ ],
+ [
+ [
+ 269,
+ 152,
+ 12343
+ ],
+ [
+ 271,
+ 152,
+ 12435
+ ],
+ [
+ 272,
+ 152,
+ 12461
+ ],
+ [
+ 275,
+ 152,
+ 12520
+ ],
+ [
+ 277,
+ 151,
+ 12521
+ ],
+ [
+ 278,
+ 151,
+ 12523
+ ],
+ [
+ 280,
+ 151,
+ 12581
+ ],
+ [
+ 281,
+ 151,
+ 12582
+ ],
+ [
+ 282,
+ 151,
+ 12642
+ ],
+ [
+ 284,
+ 151,
+ 12643
+ ],
+ [
+ 285,
+ 150,
+ 12644
+ ],
+ [
+ 286,
+ 150,
+ 12704
+ ],
+ [
+ 287,
+ 150,
+ 12762
+ ],
+ [
+ 288,
+ 150,
+ 12763
+ ],
+ [
+ 289,
+ 150,
+ 12824
+ ],
+ [
+ 290,
+ 150,
+ 12889
+ ],
+ [
+ 291,
+ 150,
+ 12947
+ ],
+ [
+ 292,
+ 150,
+ 13005
+ ],
+ [
+ 293,
+ 150,
+ 13066
+ ]
+ ],
+ [
+ [
+ 270,
+ 172,
+ 18223
+ ],
+ [
+ 271,
+ 172,
+ 18227
+ ],
+ [
+ 273,
+ 172,
+ 18277
+ ],
+ [
+ 277,
+ 172,
+ 18278
+ ],
+ [
+ 280,
+ 172,
+ 18339
+ ],
+ [
+ 283,
+ 170,
+ 18340
+ ],
+ [
+ 288,
+ 168,
+ 18398
+ ],
+ [
+ 292,
+ 167,
+ 18398
+ ],
+ [
+ 295,
+ 167,
+ 18402
+ ],
+ [
+ 296,
+ 167,
+ 18465
+ ],
+ [
+ 298,
+ 167,
+ 18466
+ ],
+ [
+ 300,
+ 166,
+ 18522
+ ],
+ [
+ 301,
+ 166,
+ 18583
+ ],
+ [
+ 302,
+ 166,
+ 18779
+ ]
+ ],
+ [
+ [
+ 301,
+ 79,
+ 19886
+ ],
+ [
+ 301,
+ 80,
+ 19995
+ ],
+ [
+ 301,
+ 82,
+ 20021
+ ],
+ [
+ 302,
+ 84,
+ 20027
+ ],
+ [
+ 303,
+ 86,
+ 20075
+ ],
+ [
+ 304,
+ 88,
+ 20076
+ ],
+ [
+ 304,
+ 90,
+ 20130
+ ],
+ [
+ 306,
+ 94,
+ 20131
+ ],
+ [
+ 309,
+ 101,
+ 20190
+ ],
+ [
+ 312,
+ 109,
+ 20191
+ ],
+ [
+ 314,
+ 113,
+ 20195
+ ],
+ [
+ 315,
+ 117,
+ 20250
+ ],
+ [
+ 316,
+ 123,
+ 20251
+ ],
+ [
+ 318,
+ 129,
+ 20311
+ ],
+ [
+ 321,
+ 136,
+ 20312
+ ],
+ [
+ 324,
+ 141,
+ 20372
+ ],
+ [
+ 326,
+ 145,
+ 20374
+ ],
+ [
+ 329,
+ 150,
+ 20432
+ ],
+ [
+ 330,
+ 153,
+ 20434
+ ],
+ [
+ 331,
+ 155,
+ 20499
+ ],
+ [
+ 332,
+ 157,
+ 20500
+ ],
+ [
+ 333,
+ 158,
+ 20555
+ ],
+ [
+ 333,
+ 160,
+ 20557
+ ],
+ [
+ 333,
+ 161,
+ 20614
+ ],
+ [
+ 334,
+ 162,
+ 20677
+ ],
+ [
+ 334,
+ 163,
+ 20739
+ ],
+ [
+ 335,
+ 164,
+ 20799
+ ],
+ [
+ 336,
+ 165,
+ 20801
+ ],
+ [
+ 337,
+ 165,
+ 20859
+ ],
+ [
+ 338,
+ 167,
+ 20860
+ ],
+ [
+ 338,
+ 168,
+ 20919
+ ],
+ [
+ 339,
+ 168,
+ 21020
+ ],
+ [
+ 340,
+ 168,
+ 21131
+ ],
+ [
+ 341,
+ 166,
+ 21192
+ ],
+ [
+ 342,
+ 166,
+ 21193
+ ],
+ [
+ 342,
+ 163,
+ 21253
+ ],
+ [
+ 343,
+ 162,
+ 21254
+ ],
+ [
+ 344,
+ 160,
+ 21258
+ ],
+ [
+ 344,
+ 159,
+ 21316
+ ],
+ [
+ 345,
+ 158,
+ 21317
+ ]
+ ],
+ [
+ [
+ 339,
+ 113,
+ 23351
+ ],
+ [
+ 338,
+ 113,
+ 23426
+ ],
+ [
+ 337,
+ 117,
+ 23453
+ ],
+ [
+ 336,
+ 117,
+ 23485
+ ],
+ [
+ 334,
+ 122,
+ 23505
+ ],
+ [
+ 333,
+ 124,
+ 23506
+ ],
+ [
+ 332,
+ 125,
+ 23507
+ ],
+ [
+ 331,
+ 129,
+ 23561
+ ],
+ [
+ 329,
+ 132,
+ 23562
+ ],
+ [
+ 327,
+ 135,
+ 23623
+ ],
+ [
+ 323,
+ 143,
+ 23625
+ ],
+ [
+ 320,
+ 149,
+ 23682
+ ],
+ [
+ 319,
+ 150,
+ 23683
+ ],
+ [
+ 317,
+ 152,
+ 23745
+ ],
+ [
+ 314,
+ 157,
+ 23747
+ ],
+ [
+ 313,
+ 159,
+ 23805
+ ],
+ [
+ 310,
+ 165,
+ 23806
+ ],
+ [
+ 310,
+ 166,
+ 23810
+ ],
+ [
+ 309,
+ 167,
+ 23908
+ ]
+ ],
+ [
+ [
+ 319,
+ 69,
+ 25630
+ ],
+ [
+ 321,
+ 70,
+ 25747
+ ],
+ [
+ 322,
+ 71,
+ 25774
+ ],
+ [
+ 326,
+ 73,
+ 25779
+ ],
+ [
+ 327,
+ 74,
+ 25843
+ ],
+ [
+ 333,
+ 78,
+ 25844
+ ],
+ [
+ 335,
+ 80,
+ 25904
+ ]
+ ],
+ [
+ [
+ 256,
+ 179,
+ 27231
+ ],
+ [
+ 257,
+ 179,
+ 27302
+ ],
+ [
+ 263,
+ 179,
+ 27332
+ ],
+ [
+ 282,
+ 179,
+ 27393
+ ],
+ [
+ 290,
+ 179,
+ 27394
+ ],
+ [
+ 314,
+ 179,
+ 27455
+ ],
+ [
+ 326,
+ 180,
+ 27457
+ ],
+ [
+ 329,
+ 180,
+ 27460
+ ],
+ [
+ 336,
+ 180,
+ 27516
+ ],
+ [
+ 343,
+ 180,
+ 27516
+ ],
+ [
+ 344,
+ 180,
+ 27578
+ ],
+ [
+ 345,
+ 180,
+ 27580
+ ],
+ [
+ 346,
+ 180,
+ 27639
+ ],
+ [
+ 347,
+ 180,
+ 27641
+ ],
+ [
+ 348,
+ 179,
+ 27698
+ ],
+ [
+ 350,
+ 179,
+ 27759
+ ],
+ [
+ 352,
+ 179,
+ 27760
+ ],
+ [
+ 354,
+ 179,
+ 27821
+ ],
+ [
+ 357,
+ 179,
+ 27882
+ ],
+ [
+ 358,
+ 179,
+ 27944
+ ],
+ [
+ 359,
+ 179,
+ 28003
+ ],
+ [
+ 361,
+ 179,
+ 28004
+ ]
+ ]
+ ],
+ ".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 95cbe5d1..c74fa013 100644
--- a/tests/auto/inputpanel/data/tst_inputpanel.qml
+++ b/tests/auto/inputpanel/data/tst_inputpanel.qml
@@ -1102,6 +1102,7 @@ Rectangle {
{ initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText, toggleShiftCount: 1, inputSequence: "klmnopqrst", outputText: "klmnopqrst" },
{ initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText, toggleShiftCount: 3, inputSequence: "uvwxyz", outputText: "UVWXYZ" },
{ initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_CN", initInputMode: "ChineseHandwriting", inputSequence: "\u4e2d\u6587", outputText: "\u4e2d\u6587" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_TW", initInputMode: "ChineseHandwriting", inputSequence: "\u570b", outputText: "\u570b" },
]
}
diff --git a/tests/auto/inputpanel/hwr_test_data/trad_chinese/22283_100_0.txt b/tests/auto/inputpanel/hwr_test_data/trad_chinese/22283_100_0.txt
new file mode 100644
index 00000000..2ee9924d
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/trad_chinese/22283_100_0.txt
@@ -0,0 +1,279 @@
+.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
+232 61 0
+232 62 51
+232 63 71
+232 65 75
+232 74 132
+232 77 133
+234 90 193
+238 110 194
+239 113 195
+240 118 259
+242 128 260
+243 131 317
+244 136 319
+245 140 376
+245 144 377
+246 147 439
+246 154 441
+247 158 497
+248 162 498
+248 165 561
+248 170 562
+248 172 619
+248 174 620
+248 175 679
+248 176 743
+248 177 744
+248 178 748
+248 179 987
+.PEN_UP
+.PEN_DOWN
+229 61 2287
+230 61 2346
+231 61 2347
+232 61 2409
+234 61 2411
+241 61 2470
+252 60 2472
+256 60 2475
+288 58 2532
+308 57 2590
+325 57 2591
+338 57 2654
+347 56 2655
+350 55 2713
+351 55 2714
+352 55 2779
+353 54 2780
+355 54 2837
+357 53 2839
+358 53 2924
+359 53 3211
+360 54 3331
+361 56 3380
+362 58 3381
+363 61 3440
+363 68 3441
+363 72 3442
+363 82 3504
+363 99 3505
+363 102 3507
+365 111 3564
+366 119 3565
+368 132 3626
+370 146 3627
+370 152 3686
+370 157 3687
+370 162 3691
+370 166 3747
+370 171 3748
+370 175 3813
+370 177 3871
+370 178 3876
+370 179 4091
+371 179 4239
+.PEN_UP
+.PEN_DOWN
+261 103 7159
+262 103 7207
+263 103 7208
+268 103 7268
+277 102 7269
+285 101 7334
+291 101 7335
+296 100 7338
+297 100 7390
+310 97 7392
+315 95 7449
+317 94 7450
+318 93 7451
+319 92 7511
+321 92 7571
+323 92 7572
+325 92 7631
+325 91 7632
+326 91 7692
+327 91 7755
+328 90 7844
+.PEN_UP
+.PEN_DOWN
+263 126 9608
+264 126 9663
+264 127 9664
+265 133 9723
+265 136 9724
+265 139 9785
+265 141 9786
+265 142 9845
+266 144 9846
+266 145 9906
+266 146 9908
+267 148 9965
+267 149 9966
+.PEN_UP
+.PEN_DOWN
+264 126 10655
+267 126 10724
+272 125 10741
+277 125 10786
+281 125 10787
+287 125 10847
+288 125 10848
+291 124 10851
+293 123 10915
+293 125 11083
+293 126 11149
+293 130 11150
+293 132 11155
+293 135 11210
+293 138 11211
+293 139 11271
+294 142 11272
+294 143 11371
+294 144 11425
+294 145 11428
+295 146 11484
+.PEN_UP
+.PEN_DOWN
+269 152 12343
+271 152 12435
+272 152 12461
+275 152 12520
+277 151 12521
+278 151 12523
+280 151 12581
+281 151 12582
+282 151 12642
+284 151 12643
+285 150 12644
+286 150 12704
+287 150 12762
+288 150 12763
+289 150 12824
+290 150 12889
+291 150 12947
+292 150 13005
+293 150 13066
+.PEN_UP
+.PEN_DOWN
+270 172 18223
+271 172 18227
+273 172 18277
+277 172 18278
+280 172 18339
+283 170 18340
+288 168 18398
+292 167 18398
+295 167 18402
+296 167 18465
+298 167 18466
+300 166 18522
+301 166 18583
+302 166 18779
+.PEN_UP
+.PEN_DOWN
+301 79 19886
+301 80 19995
+301 82 20021
+302 84 20027
+303 86 20075
+304 88 20076
+304 90 20130
+306 94 20131
+309 101 20190
+312 109 20191
+314 113 20195
+315 117 20250
+316 123 20251
+318 129 20311
+321 136 20312
+324 141 20372
+326 145 20374
+329 150 20432
+330 153 20434
+331 155 20499
+332 157 20500
+333 158 20555
+333 160 20557
+333 161 20614
+334 162 20677
+334 163 20739
+335 164 20799
+336 165 20801
+337 165 20859
+338 167 20860
+338 168 20919
+339 168 21020
+340 168 21131
+341 166 21192
+342 166 21193
+342 163 21253
+343 162 21254
+344 160 21258
+344 159 21316
+345 158 21317
+.PEN_UP
+.PEN_DOWN
+339 113 23351
+338 113 23426
+337 117 23453
+336 117 23485
+334 122 23505
+333 124 23506
+332 125 23507
+331 129 23561
+329 132 23562
+327 135 23623
+323 143 23625
+320 149 23682
+319 150 23683
+317 152 23745
+314 157 23747
+313 159 23805
+310 165 23806
+310 166 23810
+309 167 23908
+.PEN_UP
+.PEN_DOWN
+319 69 25630
+321 70 25747
+322 71 25774
+326 73 25779
+327 74 25843
+333 78 25844
+335 80 25904
+.PEN_UP
+.PEN_DOWN
+256 179 27231
+257 179 27302
+263 179 27332
+282 179 27393
+290 179 27394
+314 179 27455
+326 180 27457
+329 180 27460
+336 180 27516
+343 180 27516
+344 180 27578
+345 180 27580
+346 180 27639
+347 180 27641
+348 179 27698
+350 179 27759
+352 179 27760
+354 179 27821
+357 179 27882
+358 179 27944
+359 179 28003
+361 179 28004
+.PEN_UP