Keyman: Customize Unicode-Complete Fonts for Mobile Keyboards Design
I support Cameroon keyboard (already in MSKLC and XKB, previously in Keyman) and I am testing Keyman for Android / iOS.
I have:
- Designed keyboard with touch layout (Keyman Developer 9)
- All symbols defined
- Uploaded the font to Github
- defines this font for the font and OSKfont.
- Tested with keyboard on Android / iOS devices.
The relevant part of my code is here:
"options" : {
"device" : "any",
"keyboardBaseUri" : "https://github.com/erros84/Cameroon-Keyboard/raw/master/",
"fontBaseUri" : "https://github.com/erros84/Cameroon-Keyboard/raw/master/Fontββs/"
},
"keyboard" : {
"id" : "camq_mob_progress",
"name" : "Cameroon QWERTY",
"filename" : "camq_mob_progress-1.0.js",
"version" : "1.0",
"lastModified" : "2017-08-03T21:21:31.154+01:00",
"font" : {
"family" : "Andika Afr",
"size" : "20pt",
"source" : "ANDIKAAFR-R.TTF"
},
"oskFont" : {
"family" : "Andika Afr",
"size" : "20pt",
"source" : "ANDIKAAFR-R.TTF"
},
On Android, the keyboard buttons are rendered in Andika Africa as expected, but even inside the Keyman app, textareas (both keymanWeb and Android) use incomplete monospaced fonts that are not rendered properly. I thought the Keyman app might use my own font, at least in some places.
We use decomposed diacritics and a few IPA special characters that have been in Unicode since v5. Some diacritics, like this one, don't stick around in their letters. Here's an example of our most difficult symbols / combinations: ΙΙΙΜΚΙ¨α· ΙΖΕΖΜ©.
https://github.com/erros84/Cameroon-Keyboard/blob/master/Screenshot.png
I was wrong that I could add a font (at least for the KM notepad interface) and possibly outside of it. I know mobile fonts are sterilized so that they can minimize RAM. I chose Andika Afr for aesthetics, regional completeness and size.
If I can't add a specific font for this, does KM Android install any relatively complete (and non-monospaced) fonts that I can go to? I would be pleased with any Andika, Charis SIL, Doulos SIL, Arial, Noto, Cambria, Gentium, DejaVu, code2000, Arial, Lucida.
Updates in response to Marc:
Ok, so I read compilation errors, and therefore solved several key problems. There is an interesting one:Warning: line 0 warning 209F: The touch layout font should be the same as the On Screen Keyboard font and be the same for all platforms.
The .js file has a link to Andika and Andika Afr. After searching, the only other file that contains a link to "Andika" (not Andika Afr) is the KVK file (which is not directly edited). Oddly enough, removing KVK from the project and re-checking the Android Keyboard brought everything back to Courier.
It seems that the compilation of the Touch Keyboard on Android is strangely related to setting the Font on KVK and I can't figure out how to reconfigure the font in KVK (no code representation).
source to share