From 29d4cc0354263f50fe5d87875564f0366e63ab70 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Fri, 12 Aug 2022 19:52:20 -0500 Subject: [PATCH 1/5] test(core): add sample tiny file - also snapshot dtd --- core/tests/unit/ldml/001_tiny.kmx | Bin 0 -> 768 bytes core/tests/unit/ldml/001_tiny.xml | 20 +++ core/tests/unit/ldml/ldmlKeyboard.dtd | 192 ++++++++++++++++++++++++++ 3 files changed, 212 insertions(+) create mode 100644 core/tests/unit/ldml/001_tiny.kmx create mode 100644 core/tests/unit/ldml/001_tiny.xml create mode 100644 core/tests/unit/ldml/ldmlKeyboard.dtd diff --git a/core/tests/unit/ldml/001_tiny.kmx b/core/tests/unit/ldml/001_tiny.kmx new file mode 100644 index 0000000000000000000000000000000000000000..3c160a87064d3213a2fd7fda31e1e0825a3f6579 GIT binary patch literal 768 zcmc&w%}T>S5FYD zf=5r{BlrgT?It#Q^B_1d`^`7=&CKq$JHa`X>DR`7D8ZJHST2%I`=nE4KCAL6uW??= zcqGTnY19NOIqbMQ4w(#xT88_qRCNANr2A4avl{PM1*nA79N5)z@8EV1G+T)0Ie!3}yFBImIp=Rc)Bg@P76`??$zY(QW-j-g5$UX8Pc8zIq>yV< zk3x!LMF~YDs7VbdgzI^`JsC|>Uo`oiS8v@=ijD*wGt>{!B&$N*Iar6n7eMj^F literal 0 HcmV?d00001 diff --git a/core/tests/unit/ldml/001_tiny.xml b/core/tests/unit/ldml/001_tiny.xml new file mode 100644 index 00000000000..4d79596fa3b --- /dev/null +++ b/core/tests/unit/ldml/001_tiny.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/core/tests/unit/ldml/ldmlKeyboard.dtd b/core/tests/unit/ldml/ldmlKeyboard.dtd new file mode 100644 index 00000000000..f150fd60938 --- /dev/null +++ b/core/tests/unit/ldml/ldmlKeyboard.dtd @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 189124ba6995e3031a1ccf17b2756b00c7fa9246 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Fri, 12 Aug 2022 19:52:56 -0500 Subject: [PATCH 2/5] feat(core): update COMP_KEYBOARD_EX #5015 - uberstruct --- core/src/kmx/kmx_file.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/kmx/kmx_file.h b/core/src/kmx/kmx_file.h index 04504645715..854ca564295 100644 --- a/core/src/kmx/kmx_file.h +++ b/core/src/kmx/kmx_file.h @@ -340,11 +340,14 @@ struct COMP_KEYBOARD { KMX_DWORD dwBitmapSize; // 003C size in bytes of the bitmaps }; -// TODO-LDML: fill this in +/** + * Only valid if comp_keyboard.dwFlags&0x20 + */ struct COMP_KEYBOARD_EX { + COMP_KEYBOARD comp_keyboard; // 0000 see COMP_KEYBOARD KMX_DWORD dpKMXPlus; // 0040 offset of KMXPlus data, header is first - KMX_DWORD dwKMXPlusSize; // 0048 size in bytes of entire KMXPlus data - }; + KMX_DWORD dwKMXPlusSize; // 0044 size in bytes of entire KMXPlus data +}; typedef COMP_KEYBOARD *PCOMP_KEYBOARD; typedef COMP_STORE *PCOMP_STORE; From 1ccc43df043b2b079985ff567568b56eba4de8b7 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 15 Aug 2022 12:06:45 -0500 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: Marc Durdin --- core/src/kmx/kmx_file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/kmx/kmx_file.h b/core/src/kmx/kmx_file.h index 854ca564295..0adc8cedeed 100644 --- a/core/src/kmx/kmx_file.h +++ b/core/src/kmx/kmx_file.h @@ -341,7 +341,7 @@ struct COMP_KEYBOARD { }; /** - * Only valid if comp_keyboard.dwFlags&0x20 + * Only valid if comp_keyboard.dwFlags&KF_KMXPLUS */ struct COMP_KEYBOARD_EX { COMP_KEYBOARD comp_keyboard; // 0000 see COMP_KEYBOARD From 9e44a7f9bc53c845b6faf8370b91b0a88f372e8e Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 15 Aug 2022 12:20:41 -0500 Subject: [PATCH 4/5] feat(core): Sample LDML data updates, kmx_file #5015 Review comments: - moved KMXPLUSINFO into separate struct - created resource/standards-data/ldml-keyboards for CLDR data - corrected Khmer err --- core/src/kmx/kmx_file.h | 10 +++++++--- core/tests/unit/ldml/001_tiny.xml | 6 +++--- resources/standards-data/ldml-keyboards/readme.md | 15 +++++++++++++++ .../ldml-keyboards/techpreview}/ldmlKeyboard.dtd | 0 .../ldml-keyboards/techpreview/readme.md | 3 +++ 5 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 resources/standards-data/ldml-keyboards/readme.md rename {core/tests/unit/ldml => resources/standards-data/ldml-keyboards/techpreview}/ldmlKeyboard.dtd (100%) create mode 100644 resources/standards-data/ldml-keyboards/techpreview/readme.md diff --git a/core/src/kmx/kmx_file.h b/core/src/kmx/kmx_file.h index 0adc8cedeed..c38a1ba27dd 100644 --- a/core/src/kmx/kmx_file.h +++ b/core/src/kmx/kmx_file.h @@ -340,13 +340,17 @@ struct COMP_KEYBOARD { KMX_DWORD dwBitmapSize; // 003C size in bytes of the bitmaps }; +struct COMP_KEYBOARD_KMXPLUSINFO { + KMX_DWORD dpKMXPlus; // 0040 offset of KMXPlus data, header is first + KMX_DWORD dwKMXPlusSize; // 0044 size in bytes of entire KMXPlus data +}; + /** * Only valid if comp_keyboard.dwFlags&KF_KMXPLUS */ struct COMP_KEYBOARD_EX { - COMP_KEYBOARD comp_keyboard; // 0000 see COMP_KEYBOARD - KMX_DWORD dpKMXPlus; // 0040 offset of KMXPlus data, header is first - KMX_DWORD dwKMXPlusSize; // 0044 size in bytes of entire KMXPlus data + COMP_KEYBOARD comp_keyboard; // 0000 see COMP_KEYBOARD + COMP_KEYBOARD_KMXPLUSINFO comp_keyboard_kmxplusinfo; // 0040 see COMP_KEYBOARD_EXTRA }; typedef COMP_KEYBOARD *PCOMP_KEYBOARD; diff --git a/core/tests/unit/ldml/001_tiny.xml b/core/tests/unit/ldml/001_tiny.xml index 4d79596fa3b..79028627b5f 100644 --- a/core/tests/unit/ldml/001_tiny.xml +++ b/core/tests/unit/ldml/001_tiny.xml @@ -1,5 +1,5 @@ - + @@ -9,12 +9,12 @@ - + - + diff --git a/resources/standards-data/ldml-keyboards/readme.md b/resources/standards-data/ldml-keyboards/readme.md new file mode 100644 index 00000000000..826f6d5dd51 --- /dev/null +++ b/resources/standards-data/ldml-keyboards/readme.md @@ -0,0 +1,15 @@ +# ldml-keyboards + +This data is from https://github.com/unicode-org/cldr.git + +Data will eventually be versioned, so there would be a `42`, `43` etc directory. + +Currently there is a `techpreview` directory referring to the technical preview—work in progress work in 2022. +That will very roughly correspond to , or pull requests thereunto. + +## Data Format + +Each directory contains: + +- `ldmlKeyboard.dtd` - the DTD file +- `imports/` - the importable data files (TODO-LDML) diff --git a/core/tests/unit/ldml/ldmlKeyboard.dtd b/resources/standards-data/ldml-keyboards/techpreview/ldmlKeyboard.dtd similarity index 100% rename from core/tests/unit/ldml/ldmlKeyboard.dtd rename to resources/standards-data/ldml-keyboards/techpreview/ldmlKeyboard.dtd diff --git a/resources/standards-data/ldml-keyboards/techpreview/readme.md b/resources/standards-data/ldml-keyboards/techpreview/readme.md new file mode 100644 index 00000000000..b2265826b79 --- /dev/null +++ b/resources/standards-data/ldml-keyboards/techpreview/readme.md @@ -0,0 +1,3 @@ +# ldml-keyboards/techpreview + +See [../readme.md](../readme.md) From 5e203f8eb5f848027b0685f8393ca1647a01796b Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Tue, 16 Aug 2022 08:11:27 -0500 Subject: [PATCH 5/5] Update core/src/kmx/kmx_file.h Co-authored-by: Marc Durdin --- core/src/kmx/kmx_file.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/kmx/kmx_file.h b/core/src/kmx/kmx_file.h index c38a1ba27dd..0d34cc615a9 100644 --- a/core/src/kmx/kmx_file.h +++ b/core/src/kmx/kmx_file.h @@ -349,8 +349,8 @@ struct COMP_KEYBOARD_KMXPLUSINFO { * Only valid if comp_keyboard.dwFlags&KF_KMXPLUS */ struct COMP_KEYBOARD_EX { - COMP_KEYBOARD comp_keyboard; // 0000 see COMP_KEYBOARD - COMP_KEYBOARD_KMXPLUSINFO comp_keyboard_kmxplusinfo; // 0040 see COMP_KEYBOARD_EXTRA + COMP_KEYBOARD header; // 0000 see COMP_KEYBOARD + COMP_KEYBOARD_KMXPLUSINFO kmxplus; // 0040 see COMP_KEYBOARD_EXTRA }; typedef COMP_KEYBOARD *PCOMP_KEYBOARD;