How to change display font in on-screen keyboard?

This is a 3-part questions:

  1. There is one character missing from the default font: U+A9CF - pangrangkep.


How could I show this character other than by using bitmap image?


The same character as image. (bad resolution, too small? what’s the best size?)

  1. Some users might also want the displayed font to be the standard font in their local area, which are different depending on the region, due to the sheer size of people who uses this script. Certain font might not be acceptable in some area. (on-screen keyboard and touch layout) How do I change both fonts in the on-screen and touch layout?

  2. In touch layout, setting the keyboard font and display font in the package file (.kps) doesn’t change the displayed font when i tried it in the Android app. I’m using the latest version (21 March 2021, i think). Why?

This is a newer version of the default font for Javanese Sccript in Android. but i still see the default font.

Two things for you two try:

  1. In the Developer, open the .kmn file and go to Keyboard menu > Fonts. Under Keyboard Properties, change the font for On Screen Keyboard and Touch Layout - Phone/Tablet to suit your need.
  2. Now go to .kps, and ensure that you keep these selected and included the font in the keyboard package.

I tried your first suggestion, this is the result:

I tried keyboard menu > font helper, but nothing came out.

notice several super characters, they are not supposed to be that big

normal size

You don’t want to change the font for Development Environment. Try and change to “Noto Sans Javanese” font for the three under Keyboard Properties.

I don’t have problem with the touch layout, actually, but on-screen keyboard. and strangely U+A9CF showed up correctly in touch without changing anything. maybe because it defaulted back to Windows’ Javanese Text

shown under longpress

doing as you suggested, indeed changed the touch layout’s font, but not the osk.

also the third option: touch layout - desktop was greyed out without explanation.

That’s weird that the font set for OSK doesn’t work as expected. Can you log this as a bug here and include your keyboard project folder if possible for us to try on our side?

On Windows, the font has to be installed in order for it to be used in the On Screen Keyboard. Normally, you’d include the font in a package and it would be installed as part of the keyboard package. I’m not sure if that’s what’s going on here or not?

Are we talking about 1) the missing U+A9CF in the default font in Keyman Developer, 2) changing fonts in osk and touch, 3) setting keyboard and display font in .kps and compile it doesn’t have any effect on mobile (Android), or 4) others?

Upon further experiment:

  • Changing Keyboard Fonts > Keyboard Properties > OSK’s Font size doesn’t seem to change anything in the developer. I changed it to 8 pt, 16 pt, all the same. Is this intended?
  • I don’t want to change the font in the Latin layers, just the Javanese script layers. I don’t think this is possible, does it? :weary: Many fonts that could display nice Javanese scripts have bad / incomplete Latin sets.

Also, does changing the font here affect the .kmn file, or just me / my Keyman Developer?

I was responding to (2) the issues with changing fonts in OSK. The OSK and the touch layout currently have separate implementations and font controls are different for the two.

Fonts are always a bit of a struggle. Every time I work on the fonts, I run into different consistency issues across platforms. The ideal is to include a font in the keyboard package and refer to that font in OSK and the touch layout definition, as well as ensure it is set correctly in the package details.

I do think I would like to do some more work here; see [Developer] Font management in Keyman Developer is overly complex · Issue #1093 · keymanapp/keyman · GitHub for some of our research.

1 Like

On Keyman Developer 14.0.270 stable, the font selected for OSK should reflect right in the Developer. To take a step further, you can compile the keyboard and then test install to see its effect.

The font selected for OSK will be for all layers in the OSK, not any specific one. More often than not, a keyboard is for a language and one font usually suffice. We do not recommend to have more than one language in one keyboard.

What is chosen for which should reflect so accordingly, if not, please help file a bug on our github. The desired font should be included in the keyboard package (i.e. .kps) just in case it does not exist in the OS on which the keyboard is being installed.

No, Javanese is one language with two (some might say three) written scripts. Some other languages in Indonesia have these duality too. Balinese, Sundanese, Bugis, Batak, etc. As well as non-Indonesian languages, such as Central Asian languages.

I changed the size from 10 to 20 to 100, to no effect, after being installed. I tested with Noto Sans Javanese as well as normal Latin font, such as Calibri. Does changing font size works for you guys?

Developer view

Desktop view

PPS: I found out the trick to get rid of those annoying large texts is to put space before and after.

But the text letters became very small in the desktop (again, setting the font size from 10-100 doesn’t change)

Compared to normal size

Also, I’m switching to Noto Sans Javanese, and it works both for Latin and Javanese script characters. The only problem is that the letters seem to be located quite high, as seen in this web layout:

What might be the problem?

Edit: Talked via zoom, and these bugs have been resolved. Thanks, makara!

We do not actually recommend having a keyboard that supports every script a language might use. We recommend one keyboard for a script such as Javanese (perhaps for multiple languages), but create another keyboard for the other script(s) used. That way your fonts can be geared for that one script AND you aren’t mixing language tags.