3

I'm the maintainer for the Cameroon Keyboard (already in MSKLC and XKB, formerly in Keyman), and I am testing Keyman for Android/iOS.

I have:

  • Developed a keyboard with a touch Layout (Keyman Developer 9)
  • Defined all characters
  • Uploaded the font to Github
  • defined this font for font and OSKfont.
  • Tested the 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 show up in Andika Africa as expected, but even inside the Keyman app, the text areas (both keymanWeb and Android) use incomplete monospaced fonts that don't display properly. I thought that the Keyman app could use my custom 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 such as this one ◌᷆ don't stay on their letters. Here is a sample of our most complex characters/combinations: ɛ́ɔ̀ə̌ʉ̂ɨ᷅ɄƁŒƐ̩ .

https://github.com/erros84/Cameroon-Keyboard/blob/master/Screenshot.png

Was I mistaken that I could add a font (at least for the KM notepad interface), and maybe beyond. I am aware that mobile fonts are neutered 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 latch onto? I'd be happy with any Andika, Charis SIL, Doulos SIL, Arial, Noto, Cambria, Gentium, DejaVu, code2000, Arial, Lucida.

Updates in response to Marc:

Ok, so I read through the compile errors, and so I solved a couple of 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 reference to both Andika and Andika Afr. After a search, the only other file containing a reference to "Andika" (not Andika Afr) is the KVK file (which is not directly editable). Weirdly, removing the KVK from the project and retesting the Android Keyboard set everything back to Courier.

It seems that the compilation of the Touch Keyboard on Android is strangely tied to the Font setting on the KVK, and I can't figure out how to reconfigure the font in the KVK (no code view).

Matthew
  • 153
  • 1
  • 7

1 Answers1

0

The fontBaseUri appears to be incorrect. It should refer to the folder in which the final font file can be located:

"fontBaseUri" : "https://github.com/erros84/Cameroon-Keyboard/raw/master/Fonts/"
Marc Durdin
  • 1,675
  • 2
  • 20
  • 27
  • Ok, I updated it to this: `https://github.com/erros84/Cameroon-Keyboard/raw/master/Fonts/` Same problem, Andika shows on the KB buttons, but not the KM interface. – Matthew Aug 04 '17 at 14:53
  • How are you installing the keyboard? I'm not sure how the keyboard is installing at all? `https://github.com/erros84/Cameroon-Keyboard/camq_mob_progress-1.0.js` (`keyboardBaseUri + keyboard/filename`) gives a 404 error, because the keyboard is not there. `keyboardBaseUri` needs to point to a similar `/raw/master/` path (and the keyboard needs to be in the repo as well). – Marc Durdin Aug 05 '17 at 00:34
  • Ok, that's news to me. I'm using the Test Keyboard feature, opening up the site in the browser and installing to my Android, and it seems to be receiving the .json file. Is that all that gets transferred? All of the keyboards on the repo have nonsense values in this for both paths, so I'm confused why I have an issue...and how theirs manage to work. I added my source files to the repo. Please point me to any documentation you have on choosing fonts for mobile. – Matthew Aug 05 '17 at 16:23
  • The Test Keyboard feature doesn't use the .json file to configure the test environment (it probably should). The test environment picks up fonts from the current editor and code fonts in Keyman Developer. The .json files are used for private distribution of the keyboards; all the keyboards in the public repo are distributed through the Keyman app and at present the .json file is not used there either. Consolidation of this mismatch is in progress (first steps at https://github.com/keymanapp/keyboards/pull/61) – Marc Durdin Aug 07 '17 at 05:17
  • So you are saying that if I put the files on the official Keyman keyboard repository, then things should work properly from the top-down? I was hoping to test on my own before sharing it out, but I can do that. – Matthew Aug 08 '17 at 10:53
  • Yes, that will work; you can also distribute and test the keyboard yourself following the guide at https://help.keyman.com/developer/9.0/guides/distribute – Marc Durdin Aug 08 '17 at 14:48