Repository navigation
Fix ZWNJ and ZWJ in the Kannada KGP layout - #876
Conversation
In kn-kgp, ff after a virama now types virama + ZWNJ, so a visible virama can sit before another consonant (ನ್ನ). F after ರ types ZWJ + virama in one key, so ArFy gives ಆರ್ಯ instead of ರಯ. The old rFf order still works and F elsewhere still types ZWJ. KX types ಖ಼. Fixes wikimedia#511.
srish
left a comment
There was a problem hiding this comment.
Thanks @prasadus92 for this PR!
One thing I noticed: after a letter with a nukta (ಜ಼, ಫ಼, ಖ಼), ff types a Latin "f" instead of the ZWNJ. For example, jXff gives ಜ಼್f. Changing maxKeyLength from 2 to 3 fixed this when I tried it, and the tests still pass. Could you take a look, and maybe add a test like jXff?
|
Thanks, good catch. maxKeyLength is now 3, and I added jXff and PXff tests. |
|
Second f is pretty straightforward if F is mapped to ZWJ today, it needs to be instead be ZWJ+virama Think of F as second variant of f, special purposed for ರ to have a vattu and avoid arkavattu formation Read #511 |
|
Thanks. F now types ZWJ and virama only after ರ, and nothing anywhere else. I removed the 3 old rules that could leave a stray ZWJ, and added tests for F after a consonant, a vowel and a virama. ZWNJ still comes only from a second f after a virama. |
|
Thanks a lot @prasadus92 for these improvements and @MayuraVerma for explaining the expected behaviour so clearly. |
Fixes #511.
In
kn-kgp, a second f after a virama did nothing, so there was no way to type virama + ZWNJ, which Kannada uses to keep a visible virama before another consonant (ನ್ನ). And F always typed a bare ZWJ, soArFygave ರಯ instead of ಆರ್ಯ.With this change, ff after a virama types ZWNJ, and F after ರ types ZWJ + virama in one stroke. That matches KaGaPa's Nudi mapping reference (
kagapa-blr/kannada-nudi-core,docs/). The oldrFforder still works, F elsewhere still types ZWJ, and I added KX for ಖ಼, which the same reference lists.I ran the 741 key sequences from that reference through the rules. 80 gave a different result before this change and 16 still do; those 16 look like typos in the table (ಅರ್ಘ is listed as
arfP, but P is ಫ). I added 5 fixtures. The full suite passes, and the new fixtures fail without the change.@MayuraVerma, does this match what you were after in #511?
cc @aravindavk, as the author of this layout.