Change font size of mobile key caps

How do I change the size of the glyphs of the the keycaps on a mobile keyboard that I have built with Keyman Developer? The ones in the screenshot are too small.

While there’s no entry for it in the graphical touch-layout editor, if you click the “Keyboard” menu, then the “Fonts…” menu item:

(in case you usually use a different language)


You’ll land on this dialog:


The default value we use for both of those boxes, if left blank, is 1. Setting it to a higher value will multiply the default text scaling by that value - so, 1.2 will increase the key-cap text size by 20%.

That said, if our engine thinks that the key-cap text is getting too large and will overflow the key, it will try to shrink it just enough to keep it fully visible. (If this only happens for some keys, it can look kind of bad, so try not to push things too far.)

Upon investigation… looks like there may be a bug with how this is handled (at least, in 17.0), which would certainly give you trouble in this regard. I’ve just made an issue regarding this at bug(web): layout font size not being properly applied · Issue #10444 · keymanapp/keyman · GitHub.

Yes, seems like some sort of bug. I’ve tried 1.2, 1.5, 2.0 and even 5.0 with no change in size to the key-cap glyphs.

I changed the font and it looked better. It’s possible that the font I was using first, Lateef, has a lot of room above and below the glyph on the line and Keyman was trying to shrink it to stay in key, but because of the extra clearance, it just looks permanently small.

I’ve now tried Noto Sans Arabic and it looks bigger.

We’ve just merged in a series of fixes that should fix this within our upcoming 17.0 release. Unfortunately, they’re not straightforward to backport to 16.0.

If you wait about 24 hours from this comment, you should be able to test this with our next nightly build if desired.

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.