diff --git a/CHANGELOG.md b/CHANGELOG.md index ca2a0c13..69e306e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ ## [Unreleased] +- Fulfilled full coverage of Basic Multilingual Plane + by adding toggle settings for *optional* characters + (which may not have system font support) +- Updated stroke input data to [Conway Stroke Data v2.0.0] + - Adds *optional* characters U+9FD1 鿑 to U+9FFF 鿿 + - Adds *optional* characters U+4DB6 䶶 to U+4DBF 䶿 + - Adds *optional* character 𠀤 + - Adds character 𠮟 + - Adds characters 𠂇𠦝𡯂𤴓𦉪𨸏 + - Adds characters 𠓗𠓾𣁾𤾩 + - Adds *optional* character 𫟷 + ## [v1.5.0] (71) Cursed be Android 16 for ever and ever (2025-09-21) @@ -844,6 +856,8 @@ the actual functionality has not been implemented yet. [v0.1.0]: https://github.com/stroke-input/stroke-input-android/releases/tag/v0.1.0 +[Conway Stroke Data v2.0.0]: + https://github.com/stroke-input/stroke-input-data/releases/tag/v2.0.0 [Conway Stroke Data v1.34.0]: https://github.com/stroke-input/stroke-input-data/releases/tag/v1.34.0 [Conway Stroke Data v1.33.1]: diff --git a/app/src/main/assets/about-zh-Hans-CN.html b/app/src/main/assets/about-zh-Hans-CN.html index 40af7ea4..3b88b19b 100644 --- a/app/src/main/assets/about-zh-Hans-CN.html +++ b/app/src/main/assets/about-zh-Hans-CN.html @@ -29,10 +29,10 @@

Apache-2.0 授权,见<https://www.apache.org/licenses/LICENSE-2.0.html>。

笔画输入资料

-

Conway Stroke Data (v1.34.0)

+

Conway Stroke Data (v2.0.0)

sequence-characters.txt

-© 2021–2024 Conway
+© 2021–2025 Conway
CC-BY-4.0 授权,见<https://creativecommons.org/licenses/by/4.0/>。

diff --git a/app/src/main/assets/about-zh-Hant-HK.html b/app/src/main/assets/about-zh-Hant-HK.html index 8918f59c..c96651aa 100644 --- a/app/src/main/assets/about-zh-Hant-HK.html +++ b/app/src/main/assets/about-zh-Hant-HK.html @@ -29,10 +29,10 @@

Apache-2.0 授權,見<https://www.apache.org/licenses/LICENSE-2.0.html>。

筆畫輸入資料

-

Conway Stroke Data (v1.34.0)

+

Conway Stroke Data (v2.0.0)

sequence-characters.txt

-© 2021–2024 Conway
+© 2021–2025 Conway
CC-BY-4.0 授權,見<https://creativecommons.org/licenses/by/4.0/>。

diff --git a/app/src/main/assets/about-zh-Hant-TW.html b/app/src/main/assets/about-zh-Hant-TW.html index f2fe288d..64f1e396 100644 --- a/app/src/main/assets/about-zh-Hant-TW.html +++ b/app/src/main/assets/about-zh-Hant-TW.html @@ -29,10 +29,10 @@

Apache-2.0 授權,見<https://www.apache.org/licenses/LICENSE-2.0.html>。

筆畫輸入資料

-

Conway Stroke Data (v1.34.0)

+

Conway Stroke Data (v2.0.0)

sequence-characters.txt

-© 2021–2024 Conway
+© 2021–2025 Conway
CC-BY-4.0 授權,見<https://creativecommons.org/licenses/by/4.0/>。

diff --git a/app/src/main/assets/about.html b/app/src/main/assets/about.html index 495170e4..85ac0bd5 100644 --- a/app/src/main/assets/about.html +++ b/app/src/main/assets/about.html @@ -32,10 +32,10 @@

https://www.apache.org/licenses/LICENSE-2.0.html>.

Stroke input data

-

Conway Stroke Data (v1.34.0)

+

Conway Stroke Data (v2.0.0)

sequence-characters.txt

-© 2021–2024 Conway
+© 2021–2025 Conway
Licensed under CC-BY-4.0, see <https://creativecommons.org/licenses/by/4.0/>.

diff --git a/app/src/main/assets/characters-simplified.txt b/app/src/main/assets/characters-simplified.txt index 486c76d1..144a368f 100644 --- a/app/src/main/assets/characters-simplified.txt +++ b/app/src/main/assets/characters-simplified.txt @@ -2382,6 +2382,19 @@ 龟 鿎 鿏 +鿒 +鿔 +鿕 +鿭 +鿰 +鿲 +鿴 +鿵 +鿶 +鿷 +鿸 +鿹 +鿺 𠀾 𣗋 𣲗 @@ -2443,6 +2456,7 @@ 𫞩 𫟅 𫟦 +𫟷 𫟹 𫟼 𫠆 diff --git a/app/src/main/assets/characters-traditional.txt b/app/src/main/assets/characters-traditional.txt index 13115b25..8f5e9476 100644 --- a/app/src/main/assets/characters-traditional.txt +++ b/app/src/main/assets/characters-traditional.txt @@ -2924,12 +2924,14 @@ 鉗 鉚 鉛 +鉝 鉞 鉢 鉤 鉥 鉦 鉧 +鉨 鉬 鉭 鉮 @@ -3088,6 +3090,7 @@ 鎲 鎳 鎵 +鎶 鎸 鎻 鎼 @@ -3156,6 +3159,7 @@ 鐽 鐿 鑄 +鑈 鑊 鑌 鑑 @@ -3656,6 +3660,7 @@ 鮑 鮒 鮓 +鮗 鮙 鮚 鮜 @@ -3979,6 +3984,8 @@ 鿁 鿌 鿐 +鿓 +鿳 𡞵 𡠹 𡢃 diff --git a/app/src/main/assets/links.cmdr b/app/src/main/assets/links.cmdr index 762fd2b1..0588fc2a 100644 --- a/app/src/main/assets/links.cmdr +++ b/app/src/main/assets/links.cmdr @@ -19,8 +19,8 @@ OrdinaryDictionaryReplacement: #.links.software-properties * \stroke-input-years --> 2021--2025 * \material-version --> v1.13.0 * \material-years --> 2025 -* \stroke-data-version --> v1.34.0 -* \sequence-characters-years --> 2021--2024 +* \stroke-data-version --> v2.0.0 +* \sequence-characters-years --> 2021--2025 * \stroke-font-version --> v2.0.1 * \stroke-font-years --> 2021--2022 diff --git a/app/src/main/assets/sequence-characters.txt b/app/src/main/assets/sequence-characters.txt index 92bb5d3c..b689766d 100644 --- a/app/src/main/assets/sequence-characters.txt +++ b/app/src/main/assets/sequence-characters.txt @@ -3,7 +3,7 @@ # Part of 'Conway Stroke Data', # see . -# Copyright 2021--2024 Conway. +# Copyright 2021--2025 Conway. # Licensed under Creative Commons Attribution 4.0 International (CC-BY-4.0), # see . @@ -1620,6 +1620,7 @@ 112135415411234 㻮 1121354251 珞 112135435431234 麹 +112135435451 鿺 11213544311252 瑤 112135443544 㻚 112135445411234 㻮 @@ -1771,6 +1772,7 @@ 1121521312135414554 瓍 1121521325111 瑂 112152134 㺼 +11215215 鿱 112153 玏 112153251 玿珈 11215325111534 瑱 @@ -4036,6 +4038,7 @@ 12121325111212151535354 虁𡖂 1212132511121551534354 虁𡖂 1212132511121551535354 虁𡖂 +1212132511134 鿓 1212132511134534 蕆 1212132511134543 蕆 1212132511154444 鴊 @@ -4662,6 +4665,7 @@ 1212251342511135 䚆 1212251343115 㲟 12122513432511154444 鶧 +1212251343322521353134 鿦 12122513445 荶 12122513452 䣐 121225134552 䣐 @@ -6596,7 +6600,7 @@ 1213355 㐗 121335533533 䎝 121335541541 䎝 -12134 圦扒扖 +12134 圦扒扖𤴓 12134112 坢拌 121341121 拴 12134112251 捨 @@ -7020,6 +7024,7 @@ 1214135452 垿 12141431 垃拉 1214143112 垶 +1214143113425234343434 鿜 12141431251 培掊 121414312511 堷揞 12141431251112 墇 @@ -7290,11 +7295,11 @@ 12145113533343554 豰 1214511534 埌 12145115343511 㙟 -121451153452 𢲲 -1214511534552 𢲲 +121451153452 鿾𢲲 +1214511534552 鿾𢲲 1214511543511 㙟 -12145115452 𢲲 -121451154552 𢲲 +12145115452 鿾𢲲 +121451154552 鿾𢲲 1214512155121 壼 12145122431 壸 121451251112 堚揮 @@ -7873,7 +7878,10 @@ 1221115 耴䎲 12211151124134 䎼 12211152 耶 +122111521225135 鿣 +122111521234354251 鿤 12211152252 聉 +12211152341251 鿢 12211154 取 12211154121 埾 122111541234 棸 @@ -7896,6 +7904,9 @@ 12211154552 郰 12211155124134 䎼 122111552 耶 +1221115521225135 鿣 +1221115521234354251 鿤 +122111552341251 鿢 122111554 㽍 122111554234554234 䏈 122111554444554234 䏈 @@ -8696,6 +8707,7 @@ 1221325111212151535354 虁𡖂 122132511121551534354 虁𡖂 122132511121551535354 虁𡖂 +122132511134 鿓 122132511134534 蕆 122132511134543 蕆 122132511212151534354 蘷䕫 @@ -8716,6 +8728,7 @@ 122132521 荐 122132522 荋 122132522134 䓴 +122132534 鿒 122132534534 蒇 122132534543 蒇 122132543112 萳 @@ -9176,6 +9189,7 @@ 122251342511135 䚆 122251343115 㲟 1222513432511154444 鶧 +122251343322521353134 鿦 1222513445 荶 1222513452 䣐 12225134552 䣐 @@ -10243,7 +10257,7 @@ 122511113432511154444 鷏 12251111344544 㥲 122511114544 惪 -12251112 龺 +12251112 龺𠦝 122511121152 韩 122511121251124 蕁 122511121534 戟 @@ -11549,7 +11563,9 @@ 12342522135251214 㯮 123425221354 椤 1234252214135 楞 +123425221413513425234343434 鿝 1234252214153 楞 +123425221415313425234343434 鿝 12342522155423432411121 欏 12342522155444432411121 欏 123425232411121 槯 @@ -13089,6 +13105,7 @@ 125112425153 喸 125112425221 盙 125112432511154444 鵏 +12511243424134 鿿 125112435451 𬷕 12511244135 旉 125112441353134 敷 @@ -13361,6 +13378,7 @@ 1251431 豆 1251431121 豇 125143112212511 䜺 +12514311224553 鿲 12514311251234 䜹 12514311254 豉 1251431132511134 頭 @@ -13505,6 +13523,7 @@ 1252111125121122134 霬 125211112512112521111251211252111125121 靐 1252111125121125211112512112521111251211252111125121 䨻 +125211112512113425234343434 鿨 125211112512121354251 露 12521111251212512125121 靁 12521111251214454 䢮䨤 @@ -13860,6 +13879,7 @@ 1252413425121122134 霬 125241342512112524134251211252413425121 靐 1252413425121125241342512112524134251211252413425121 䨻 +125241342512113425234343434 鿨 125241342512121354251 露 12524134251212512125121 靁 12524134251214454 䢮䨤 @@ -14133,6 +14153,7 @@ 1252444425121122134 霬 125244442512112524444251211252444425121 靐 1252444425121125244442512112524444251211252444425121 䨻 +125244442512113425234343434 鿨 125244442512121354251 露 12524444251212512125121 靁 12524444251214454 䢮䨤 @@ -14685,7 +14706,7 @@ 1254552 𨙸 1255 丏 12552 邒 -13 丆厂 +13 丆厂𠂇 1311121115 匪 13112 厈 131121353134 厫 @@ -14960,6 +14981,7 @@ 1325111323112 揅 132511132431234 䊙 132511132511 皕 +132511132511132511 𤾩 132511134 砆頁 132511134132511134132 顨 13251113422 厠 @@ -15345,6 +15367,7 @@ 1325125113535 䃂 1325125115353 䃂 1325125115545544444 礘 +1325125121 鿬 13251251211534 碨 13251251212512125121 礧 1325125121554234 磥 @@ -15944,6 +15967,7 @@ 134132 㚏 134132522111 奤 134134 夶㚐 +1341341 𠀤 134134134 𡘙 1341345 奁 13413511225 匬 @@ -16273,6 +16297,7 @@ 13542135454431234 殩 13542153152512125221 㱺 135422 列 +13542213425234343434 鿞 135422212134341343452 䶛 13542225121 㽝 135422252 㡂 @@ -16544,6 +16569,7 @@ 1452111125115 電 1452111125121 雷 1452111125121122134 霬 +145211112512113425234343434 鿨 145211112512114521111251211452111125121 靐 1452111125121145211112512114521111251211452111125121 䨻 145211112512121354251 露 @@ -16816,6 +16842,7 @@ 1452413425115 電 1452413425121 雷 1452413425121122134 霬 +145241342512113425234343434 鿨 145241342512114524134251211452413425121 靐 1452413425121145241342512114524134251211452413425121 䨻 145241342512121354251 露 @@ -17088,6 +17115,7 @@ 1452444425115 電 1452444425121 雷 1452444425121122134 霬 +145244442512113425234343434 鿨 145244442512114524444251211452444425121 靐 1452444425121145244442512114524444251211452444425121 䨻 145244442512121354251 露 @@ -18023,6 +18051,7 @@ 21112111531 婓 21112111533533 翡 21112111541541 翡 +211121251112134 䶶 2111254444 馬 2111254444111213251 騞 2111254444111342511 䮞 @@ -18873,6 +18902,7 @@ 21121325111212151535354 虁𡖂 2112132511121551534354 虁𡖂 2112132511121551535354 虁𡖂 +2112132511134 鿓 2112132511134534 蕆 2112132511134543 蕆 2112132511212151534354 蘷 @@ -19279,6 +19309,7 @@ 2112251342511135 䚆 2112251343115 㲟 21122513432511154444 鶧 +2112251343322521353134 鿦 21122513445 荶 21122513452 䣐 211225134552 䣐 @@ -24442,7 +24473,7 @@ 2511454 𨑨 251145534 昹㫤 25114554 𨑨 -25115 号电 +25115 号电𠮟 251151112321521512 㬘 25115111235521512 㬘 25115112134 啑 @@ -27722,7 +27753,7 @@ 2513454533533 嗡 2513454541541 嗡 2513455 呛 -25135 兄叱叽㕤𠮨 +25135 兄叱叽㕤䶷𠮨 2513511 呁肙 251351112154 瓹 25135111554 瓹 @@ -27790,7 +27821,7 @@ 2513535225121 𠺕 251353523411243122 嚠 251353532511 喈 -251354 吸㕨 +251354 吸㕨䶸 2513541 呁肙 2513541112 㖓 251354112154 瓹 @@ -27998,10 +28029,12 @@ 251445315 咤 25144534121 啌 25144534154121 㗧 +2514453431211 鿽 25144534414312511 噾 25144535 咜 25144535121 啌 25144535154121 㗧 +2514453531211 鿽 25144535414312511 噾 25144535415411234 嚓 251445354251 喀 @@ -29137,6 +29170,7 @@ 252215542342513511 羂 252215542342513541 羂 2522155423432411121 羅 +252215542343241112113425234343434 鿡 25221554234324111214454 邏 2522155423432411121454 邏 25221554234324111214554 邏 @@ -29145,6 +29179,7 @@ 252215544442513511 羂 252215544442513541 羂 2522155444432411121 羅 +252215544443241112113425234343434 鿡 25221554444324111214454 邏 2522155444432411121454 邏 25221554444324111214554 邏 @@ -29821,7 +29856,7 @@ 2534531 囵 253454251 贻 25345452 沀 -2535 见 +2535 见𦉪 25351 四 25351211 囶 253512341 𡇙 @@ -30520,6 +30555,7 @@ 311151251124 铺 311151251124124 镈 3111512512 钶 +311151251212512 鿔 311151251251 铻 311151251254312 镉 3111512515 钷 @@ -30677,7 +30713,7 @@ 311153453 𬬭 311153454541541 𬭩 311153511 钥 -3111535234 铄 +3111535234 铄鿭 311153525 钝 3111535251 铅 3111535251153535251354 镵 @@ -30721,6 +30757,7 @@ 3111541353131134 镞 3111541353152134 镟 31115413534 铱 +3111541431 𫟷 311154143112 锌 3111541431251 锫 3111541431251135 镜 @@ -31058,6 +31095,7 @@ 311235154 牴 31123523 牬 31123533 物 +3112353334431234 鿯 3112353344544 㹅 311235334544 惣 31123535112 觕 @@ -31355,6 +31393,8 @@ 311532 氘 3115322 氚 311532411121 㲝 +31153253431234134 鿫 +3115325431234134 鿫 3115333 毝 311534 気 3115341251122 毺 @@ -31553,6 +31593,7 @@ 3121353121352534552 酂 3121353134 㪇 31213533 物 +3121353334431234 鿯 3121353344544 㹅 312135334544 惣 31213535112 觕 @@ -31847,12 +31888,15 @@ 3123421251 秥 3123422 利 31234221234 梨 +312342213425234343434 鿠 3123422251214 䖽 3123422254311214444 䵩 3123422254312114444 䵩 31234223112 犁 +312342231234 鿟 312342234112431 鋫 3123422342534 㴝 +312342235234 鿟 312342235251214444 䱘 31234224314311134 穙 31234224544 悡 @@ -33475,6 +33519,7 @@ 321151132511154444 䳔 321151134 臾 3211511342511134 䝿 +3211511343534 䶾 3211511344412 斞 3211511344544 惥 321152 伟印 @@ -33777,6 +33822,7 @@ 32151132511154444 䳎䳔 32151134 臾 321511342511134 䝿 +321511343534 䶾 321511344412 斞 321511344544 惥 32151135 兒 @@ -33799,6 +33845,7 @@ 3215115115115125115315 鼴 32151151151151251251 鼯 321511511511513251 鼫 +321511511511513252 鿻 321511511511513344 鼥 321511511511513412 䶄 32151151151151344 鼣 @@ -33839,7 +33886,7 @@ 3215115115115445351344 鼵 321511511511544553 鼧 3215115115115451251112 鼲 -321511511511553251 鼦 +321511511511553251 鼦鿼 3215115445445 鼠 321511544544511212511 鼱 321511544544511212521 鼱 @@ -33849,6 +33896,7 @@ 3215115445445125115315 鼴 32151154454451251251 鼯 321511544544513251 鼫 +321511544544513252 鿻 321511544544513344 鼥 321511544544513412 䶄 32151154454451344 鼣 @@ -33889,7 +33937,7 @@ 3215115445445445351344 鼵 321511544544544553 鼧 3215115445445451251112 鼲 -321511544544553251 鼦 +321511544544553251 鼦鿼 321512 伡 3215121252212511134 牘 3215121253512511134 牘 @@ -35074,7 +35122,9 @@ 325113121554 㼰 325113122154 㪏 3251131222 𠜱 +3251131225135 鿙 3251131232511154444 鵯 +3251131234354251 鿚 3251131235451 鹎 3251131252 郫 32511312552 郫 @@ -35098,6 +35148,7 @@ 325113251141533134 皦 32511325115545541234 皪 325113251213554 魄 +325113341251 鿘 32511334425221511211124 皭 3251133442522151154124 皭 325113354 皈 @@ -35355,6 +35406,7 @@ 3251514454 追 325151454 追 3251514554 追 +32515151 𨸏 3251515154334 㷗 3251515435 䦾 325152 伄 @@ -36515,6 +36567,7 @@ 34112 半 341121 全 34112121 佱 +341121341121341121 𠓾 3411222 判 341122232511154444 鵥 34112251 舍 @@ -37795,6 +37848,7 @@ 34123542511251134 閷 34123543554 殺 341251 合 +3412511 鿖 341251122 俞 34125112212154 㼶 3412511221554 㼶 @@ -37983,10 +38037,13 @@ 341353334 㒸 3413533344454 遂 34135333444544334 㸂 +34135333444544444 鿪 341353334454 遂 3413533344544334 㸂 +3413533344544444 鿪 3413533344554 遂 34135333445544334 㸂 +34135333445544444 鿪 341354455 兪 34135445512154 㼶 3413544551554 㼶 @@ -38199,7 +38256,7 @@ 34151121134431215114544 䭡 3415112113443321511 饀 3415112113443531 餒 -34151121135 飢 +34151121135 飢䶿 34151121135121251 䭇 3415112113514454 䭀 341511211351454 䭀 @@ -38503,7 +38560,7 @@ 3415115434431215114544 䭡 341511543443321511 饀 341511543443531 餒 -3415115435 飢 +3415115435 飢䶿 3415115435121251 䭇 341511543514454 䭀 34151154351454 䭀 @@ -38748,6 +38805,7 @@ 34323534 㰡 3432511 㒶 3432511154444 鳰 +343251131 鿗 34333 㐱 3434 仌从父爻 34341 丛 @@ -38862,7 +38920,7 @@ 34344544 怂 343452 爷 34345215 爸 -3435 乥仑尣 +3435 乥仑尣𡯂 343511 䏌 34351121 尩 34351353334 䝇 @@ -39251,7 +39309,7 @@ 3445112113443321511 饀 3445112113443531 餒 34451121134454544 䭃 -34451121135 飢 +34451121135 飢䶿 34451121135121251 䭇 3445112113514454 䭀 344511211351454 䭀 @@ -39554,7 +39612,7 @@ 344511543443321511 饀 344511543443531 餒 3445115434454544 䭃 -3445115435 飢 +3445115435 飢䶿 3445115435121251 䭇 344511543514454 䭀 34451154351454 䭀 @@ -40083,7 +40141,7 @@ 351125232411121 膗 351125252 朏胐 351125312341 䐃 -35112534 肭 +35112534 肭䶺 35112534125221 膃 3511253434 朒 3511254311214444121 𦢓 @@ -40261,10 +40319,10 @@ 35113445 肣 351134454 朎 351134454544 腍 -3511345234354 朡 -3511345235354 朡 +3511345234354 朡䶽 +3511345235354 朡䶽 35113453 朌肦 -351134544544 䐋 +351134544544 䐋䶼 35113454533533 䐥 35113454541541 䐥 351135 肌肍 @@ -40436,7 +40494,7 @@ 35114511534 朖 3511451251112 腪 3511451325122 䐔 -35114535 䏙 +35114535 䏙䶻 3511453534 脓 3511454 迌 351145434 䏟 @@ -40828,6 +40886,7 @@ 352512111213352511 鳍 3525121112134354 鲮 352512111213532511 鳍 +352512111214544 鿵 3525121112211134 鲯 3525121112211154 鲰 3525121112212511253 鳓 @@ -40900,6 +40959,10 @@ 35251211325111121 鳇 35251211325112534 鳈 35251211331251 鲘 +3525121133541444535 鿸 +3525121133541444553 鿸 +3525121133544144535 鿸 +3525121133544144553 鿸 3525121134 𩵋 35251211341154 鲙 35251211341534 𬶐 @@ -40914,7 +40977,9 @@ 3525121135251 𬶋 352512113525135 𩾃 3525121135254 鲏 +352512113541 鿕 352512113541234 鲦 +3525121135444 鿴 3525121135445411234 𬶭 3525121135515 鲍 352512113554234 鲧 @@ -40928,6 +40993,7 @@ 3525121141351125112 鳙 3525121141351135112 鳙 3525121141431 䲞 +35251211414312511 鿷 352512114143454135 鳑 352512114143454153 鳑 352512114153 鲂 @@ -40941,8 +41007,11 @@ 352512114411253511 䲤 352512114451135 鲩 3525121144535 𬶍 +3525121144545434252 鿹 +3525121144545443252 鿹 3525121144553 𬶍 35251211445531 𩽾 +352512114511534 鿶 35251211451325122 鳊 35251211511124 鲟 352512115113251 鲪 @@ -41207,6 +41276,7 @@ 352512144442511134113534 鱡 352512144442511134113543 鱡 35251214444251113422 鰂 +35251214444251113425234343434 鿩 35251214444251113533 鰑 3525121444425111515 鯤 35251214444251115154 鰕 @@ -41350,7 +41420,11 @@ 352512144443351 魲 35251214444335125122 鯿 352512144443354 魬 +3525121444433541444535 鿳 +3525121444433541444553 鿳 3525121444433544 䱄 +3525121444433544144535 鿳 +3525121444433544144553 鿳 3525121444434 魜魞 352512144443411234 鮽 3525121444434113455 䱧 @@ -41620,6 +41694,7 @@ 35251353535251354552 酁 35251354 兔 3525135432511154444 鵵 +352513543525135435251354 𠓗 35251354354 够 352513544454 逸 35251354454 逸 @@ -43607,6 +43682,7 @@ 4111212511 凊 4111212521 凊 4111213511 凊 +4111214 鿑 41112251 㓉 4111251 言訁 4111251111211125114544 譿 @@ -44464,10 +44540,12 @@ 41121341213543534 褻 41121341215343534 褻 4112134354 凌 +411213435413425234343434 鿛 4112135121 㓐 41121351213543534 褻 41121351215343534 褻 4112135354 凌 +411213535413425234343434 鿛 411213543534 亵 411213554 殶 4112143112 㓑 @@ -44749,6 +44827,7 @@ 41312215134 庹 413122154 度 41312215422 剫 +4131222145252 鿮 41312225121 庿 41312225134 㢍 41312251 㓉 @@ -48473,10 +48552,13 @@ 431353334 㒸 4313533344454 遂 43135333444544334 㸂 +43135333444544444 鿪 431353334454 遂 4313533344544334 㸂 +4313533344544444 鿪 4313533344554 遂 43135333445544334 㸂 +43135333445544444 鿪 431354422 前 4313544221234 㮍 4313544224444 煎 @@ -49654,6 +49736,7 @@ 44112251 沽 44112251111 淔 4411225111134 滇 +441122511121152 鿰 44112251112315 漧 44112251112321521512 瀟 4411225111234112 澣 @@ -50155,6 +50238,7 @@ 44124345251254311214444 灙 44124345251254312114444 灙 441244112251 湉 +441244124412 𣁾 4412442512 浺 441244312251 湉 44124454 䢏 @@ -53201,8 +53285,10 @@ 451153435111234 㮾 45115343534 欴 451153452 郞 +45115345213425234343434 鿥 451153453 勆㓪 4511534552 郞 +451153455213425234343434 鿥 45115422 剆 4511542515215 郒 4511543 𬣡 @@ -53211,8 +53297,10 @@ 45115435111234 㮾 4511543534 欴 45115452 郎 +4511545213425234343434 鿥 45115453 勆㓪 451154552 郎 +45115455213425234343434 鿥 4512 计订 45121 讧 45121121 诖 @@ -55370,7 +55458,7 @@ 5225253 㔘 52252552 䢺 522534 阥 -523 屮 +523 屮䶹 5231112111 陫 5231121 㞷 523112251 䧊 @@ -55491,6 +55579,7 @@ 523541112 䧏 52354131121 隆 5235413112113251 䃧 +5235413112113425234343434 鿧 52354152 降 5235415411234 際 52354251 䧄 @@ -56563,6 +56652,7 @@ 532513544454 逸 53251354454 逸 532513544554 逸 +532513545325135453251354 𠓗 532513553 勉 53251413534 袈 53251414312511 䪪 @@ -58251,6 +58341,7 @@ 5523541112 䧏 552354131121 隆 55235413112113251 䃧 +55235413112113425234343434 鿧 552354152 降 55235415411234 際 552354251 䧄 diff --git a/app/src/main/java/io/github/yawnoc/strokeinput/MainActivity.java b/app/src/main/java/io/github/yawnoc/strokeinput/MainActivity.java index 5714931d..71214241 100644 --- a/app/src/main/java/io/github/yawnoc/strokeinput/MainActivity.java +++ b/app/src/main/java/io/github/yawnoc/strokeinput/MainActivity.java @@ -24,6 +24,11 @@ import android.widget.TextView; import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.Objects; import io.github.yawnoc.utilities.Contexty; @@ -47,6 +52,19 @@ public class MainActivity public static final float KEYBOARD_HEIGHT_ADJUSTMENT_FACTOR_RANGE = KEYBOARD_HEIGHT_ADJUSTMENT_FACTOR_MAX - KEYBOARD_HEIGHT_ADJUSTMENT_FACTOR_MIN; + public static final String OPTIONAL_CANDIDATES_PREFERENCE_KEY_PREFIX = "optionalCandidatesPreference_"; + private static final List OPTIONAL_CANDIDATES_SWITCH_IDS = + Arrays.asList( + R.id.optional_main_tail_1_switch, + R.id.optional_main_tail_2_switch, + R.id.optional_main_tail_3_switch, + R.id.optional_main_tail_4_switch, + R.id.optional_extension_a_tail_switch, + R.id.optional_kangxi_bengx_switch, + R.id.optional_simplified_livermorium_switch + ); + private static final List optionalCharactersList = new ArrayList<>(); + private static final String ASSETS_DIRECTORY = "file:///android_asset/"; private static final String SOURCE_CODE_URI = "https://github.com/stroke-input/stroke-input-android"; private static final String PRIVACY_POLICY_URI = @@ -105,6 +123,20 @@ public void onStopTrackingTouch(SeekBar seekBar) } ); + for (final int optionalCandidateSwitchId : OPTIONAL_CANDIDATES_SWITCH_IDS) + { + final OptionalCandidatesSwitch optionalCandidatesSwitch = findViewById(optionalCandidateSwitchId); + final String characters = optionalCandidatesSwitch.characters; + final boolean isAllowed = loadSavedOptionalCandidatesPreference(this, characters); + + optionalCandidatesSwitch.setOnCheckedChangeListener( + (buttonView, isChecked) -> saveOptionalCandidatesPreference(characters, isChecked) + ); + + optionalCandidatesSwitch.setChecked(isAllowed); + optionalCharactersList.add(characters); + } + setCandidateOrderButtonText(loadSavedCandidateOrderPreference()); final int adjustmentProgress = loadSavedKeyboardHeightAdjustmentProgress(getApplicationContext()); @@ -172,9 +204,9 @@ private void saveKeyboardHeightAdjustmentProgress(final int keyboardHeightAdjust { Contexty.savePreferenceInt( getApplicationContext(), - StrokeInputService.PREFERENCES_FILE_NAME, - KEYBOARD_HEIGHT_ADJUSTMENT_PROGRESS_KEY, - keyboardHeightAdjustmentProgress + StrokeInputService.PREFERENCES_FILE_NAME, + KEYBOARD_HEIGHT_ADJUSTMENT_PROGRESS_KEY, + keyboardHeightAdjustmentProgress ); } @@ -191,6 +223,39 @@ private void setKeyboardHeightAdjustmentDisplayText(final float adjustmentFactor keyboardHeightAdjustmentDisplay.setText(adjustmentDisplayText); } + private static boolean loadSavedOptionalCandidatesPreference(final Context context, final String characters) + { + return + Contexty.loadPreferenceBoolean( + context, + StrokeInputService.PREFERENCES_FILE_NAME, + OPTIONAL_CANDIDATES_PREFERENCE_KEY_PREFIX + characters, + false + ); + } + + private void saveOptionalCandidatesPreference(final String characters, final boolean isAllowed) + { + Contexty.savePreferenceBoolean( + getApplicationContext(), + StrokeInputService.PREFERENCES_FILE_NAME, + OPTIONAL_CANDIDATES_PREFERENCE_KEY_PREFIX + characters, + isAllowed + ); + } + + public static Map loadSavedOptionalCandidatesPreferences(final Context context) + { + final Map isAllowedFromCharacters = new HashMap<>(); + + for (final String characters : optionalCharactersList) + { + isAllowedFromCharacters.put(characters, loadSavedOptionalCandidatesPreference(context, characters)); + } + + return isAllowedFromCharacters; + } + @Override public void onClick(final View view) { diff --git a/app/src/main/java/io/github/yawnoc/strokeinput/OptionalCandidatesSwitch.java b/app/src/main/java/io/github/yawnoc/strokeinput/OptionalCandidatesSwitch.java new file mode 100644 index 00000000..7cdf9022 --- /dev/null +++ b/app/src/main/java/io/github/yawnoc/strokeinput/OptionalCandidatesSwitch.java @@ -0,0 +1,75 @@ +/* + Copyright 2025 Conway + Licensed under the GNU General Public License v3.0 (GPL-3.0-only). + This is free software with NO WARRANTY etc. etc., + see LICENSE or . +*/ + +package io.github.yawnoc.strokeinput; + +import android.content.Context; +import android.content.res.TypedArray; +import android.util.AttributeSet; + +import com.google.android.material.switchmaterial.SwitchMaterial; + +import java.util.ArrayList; +import java.util.List; + +import io.github.yawnoc.utilities.Stringy; + +/* + A switch for toggling optional candidates. +*/ +public class OptionalCandidatesSwitch + extends SwitchMaterial +{ + public final String characters; + + public OptionalCandidatesSwitch(Context context, AttributeSet attributes) + { + super(context, attributes); + + final String minimumCandidate; + final String maximumCandidate; + final String unicodeRange; + + try (final TypedArray attributesArray = + context.getTheme().obtainStyledAttributes(attributes, R.styleable.OptionalCandidatesSwitch, 0, 0)) + { + minimumCandidate = attributesArray.getString(R.styleable.OptionalCandidatesSwitch_minimumCandidate); + maximumCandidate = attributesArray.getString(R.styleable.OptionalCandidatesSwitch_maximumCandidate); + } + + if (minimumCandidate == null || maximumCandidate == null) + { + characters = ""; + unicodeRange = ""; + } + else + { + final int minimumCodePoint = Stringy.getFirstCodePoint(minimumCandidate); + final int maximumCodePoint = Stringy.getFirstCodePoint(maximumCandidate); + + final List charactersList = new ArrayList<>(); + for (int codePoint = minimumCodePoint; codePoint <= maximumCodePoint; codePoint++) + { + charactersList.add(Stringy.toString(codePoint)); + } + + characters = String.join("", charactersList); + + final String unicodeRangeStart = Stringy.toUnicodeNotation(minimumCodePoint); + final String unicodeRangeToEnd = + (maximumCodePoint == minimumCodePoint) + ? "" + : "–" + Stringy.toUnicodeNotation(maximumCodePoint); // separated by U+2013 EN DASH + + unicodeRange = unicodeRangeStart + unicodeRangeToEnd; + } + + final String switchText = unicodeRange + "\n" + characters; + + super.setText(switchText); + } +} diff --git a/app/src/main/java/io/github/yawnoc/strokeinput/StrokeInputService.java b/app/src/main/java/io/github/yawnoc/strokeinput/StrokeInputService.java index 44ee824b..2206c69e 100644 --- a/app/src/main/java/io/github/yawnoc/strokeinput/StrokeInputService.java +++ b/app/src/main/java/io/github/yawnoc/strokeinput/StrokeInputService.java @@ -871,13 +871,29 @@ private List computeCandidates(final String strokeDigitSequence) updateCandidateOrderPreference(); + final Set prohibitedCodePoints = new HashSet<>(); + final Set prohibitedCharacters = new HashSet<>(); + for (final Map.Entry entry : isAllowedFromCharacters().entrySet()) + { + final String optionalCharacters = entry.getKey(); + final boolean isAllowed = entry.getValue(); + if (!isAllowed) + { + prohibitedCodePoints.addAll(Stringy.toCodePointSet(optionalCharacters)); + prohibitedCharacters.addAll(Stringy.toCharacterList(optionalCharacters)); + } + } + final Set exactMatchCodePoints; final List exactMatchCandidates; final String exactMatchCharacters = charactersFromStrokeDigitSequence.get(strokeDigitSequence); if (exactMatchCharacters != null) { exactMatchCodePoints = Stringy.toCodePointSet(exactMatchCharacters); + exactMatchCodePoints.removeAll(prohibitedCodePoints); + exactMatchCandidates = Stringy.toCharacterList(exactMatchCharacters); + exactMatchCandidates.removeAll(prohibitedCharacters); exactMatchCandidates.sort( candidateComparator(unpreferredCodePoints, sortingRankFromCodePoint, phraseCompletionFirstCodePoints) ); @@ -899,6 +915,7 @@ private List computeCandidates(final String strokeDigitSequence) final Set prefixMatchCodePoints = Stringy.toCodePointSet(prefixMatchCharactersCollection); prefixMatchCodePoints.removeAll(exactMatchCodePoints); + prefixMatchCodePoints.removeAll(prohibitedCodePoints); if (prefixMatchCodePoints.size() > LAG_PREVENTION_CODE_POINT_COUNT) { prefixMatchCodePoints.retainAll(commonCodePoints); @@ -1018,4 +1035,9 @@ private boolean shouldPreferTraditional() MainActivity.loadSavedCandidateOrderPreference(getApplicationContext()); return MainActivity.isTraditionalPreferred(savedCandidateOrderPreference); } + + private Map isAllowedFromCharacters() + { + return MainActivity.loadSavedOptionalCandidatesPreferences(getApplicationContext()); + } } diff --git a/app/src/main/java/io/github/yawnoc/utilities/Contexty.java b/app/src/main/java/io/github/yawnoc/utilities/Contexty.java index fed48f7e..b67bcd6a 100644 --- a/app/src/main/java/io/github/yawnoc/utilities/Contexty.java +++ b/app/src/main/java/io/github/yawnoc/utilities/Contexty.java @@ -1,5 +1,5 @@ /* - Copyright 2021--2023 Conway + Copyright 2021--2023, 2025 Conway Licensed under the GNU General Public License v3.0 (GPL-3.0-only). This is free software with NO WARRANTY etc. etc., see LICENSE or . @@ -91,6 +91,37 @@ public static void savePreferenceInt( preferencesEditor.apply(); } + public static boolean loadPreferenceBoolean( + final Context context, + final String preferenceFileName, + final String preferenceKey, + final boolean defaultValue + ) + { + final SharedPreferences preferences = context.getSharedPreferences(preferenceFileName, Context.MODE_PRIVATE); + try + { + return preferences.getBoolean(preferenceKey, defaultValue); + } + catch (ClassCastException exception) + { + return defaultValue; + } + } + + public static void savePreferenceBoolean( + final Context context, + final String preferenceFileName, + final String preferenceKey, + final boolean preferenceValue + ) + { + final SharedPreferences preferences = context.getSharedPreferences(preferenceFileName, Context.MODE_PRIVATE); + SharedPreferences.Editor preferencesEditor = preferences.edit(); + preferencesEditor.putBoolean(preferenceKey, preferenceValue); + preferencesEditor.apply(); + } + public static void showErrorMessage(final Context context, final String message) { final TextView alertTextView = new TextView(new ContextThemeWrapper(context, R.style.StrokeInputMessage)); diff --git a/app/src/main/java/io/github/yawnoc/utilities/Stringy.java b/app/src/main/java/io/github/yawnoc/utilities/Stringy.java index 164449b6..4246d171 100644 --- a/app/src/main/java/io/github/yawnoc/utilities/Stringy.java +++ b/app/src/main/java/io/github/yawnoc/utilities/Stringy.java @@ -1,5 +1,5 @@ /* - Copyright 2021--2023 Conway + Copyright 2021--2023, 2025 Conway Licensed under the GNU General Public License v3.0 (GPL-3.0-only). This is free software with NO WARRANTY etc. etc., see LICENSE or . @@ -101,13 +101,21 @@ public static Set toCodePointSet(final Collection stringCollect } /* - Convert a code point to a string + Convert a code point to a string. */ public static String toString(final int codePoint) { return String.valueOf(Character.toChars(codePoint)); } + /* + Convert a code point to Unicode `U+` notation. + */ + public static String toUnicodeNotation(final int codePoint) + { + return String.format("U+%04X", codePoint); + } + /* Convert a string to a list of (unicode) characters. */ diff --git a/app/src/main/res/layout/main_activity.xml b/app/src/main/res/layout/main_activity.xml index 0b66b8da..21d89512 100644 --- a/app/src/main/res/layout/main_activity.xml +++ b/app/src/main/res/layout/main_activity.xml @@ -7,6 +7,7 @@ --> + + + + + + + + + + + + + + +