Specifying Display Font by Device Type

Hi All,

In a keyboard package containing two fonts, is it possible in Keyman Developer to specify one font for desktop use and one for mobile use? If not, I would like to make this a feature request.



You have the option of naming a “font” and an “oskFont” in the keyboard_info file. https://help.keyman.com/developer/cloud/keyboard_info/1.0/#toc-keyboardfontinfo-object

You can look at this file for how it’s been used:

I don’t think this is quite what you are asking for as I assume that the “font” would be used for both desktop and mobile, but I don’t actually know that for sure.

tl;dr: Font associations in Keyman are definitely suffering from technical debt. .kps is the preferred location for font specification but it is more constrained than other options.

  • The font info in the .keyboard_info file is used only by KeymanWeb.

  • You can specify fonts separately in the .kvks and the .keyman-touch-layout files. However, the package file, if it specifies fonts for the keyboard, will override these. Generally, we encourage developers to make their font associations in the .kps package file, because it’s a single place and it formalises the filename association (whereas in the .kvks and .keyman-touch-layout files the association is by font face name, which is messier to maintain).

  • The Keyboard Fonts dialog in Keyman Developer lets you set the various fonts for keyboard resources (.kmn, .kvks, .keyboard-touch-layout) in one screen. It does not touch the .kps or .keyboard_info files.