keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
387 stars 107 forks source link

bug(windows): osk does not use Keyboard Font property from packages #9955

Open mcdurdin opened 10 months ago

mcdurdin commented 10 months ago

I have not yet verified this on other platforms, but it appears that the Keyboard Font property in the package editor is not being used by the OSK on Windows.

Ref: https://github.com/keymanapp/keyboards/pull/2434

I started from this PR, then updated the sil_hebrew.kmn to add:

store(&DISPLAYMAP) '../../../shared/fonts/kbd/kbdhebr/KbdHebr.json'

Then, added KbdHebr.ttf to sil_hebrew.kps, and set the Keyboard Font property to KbdHebr.ttf.

After installing the package in Keyman, it was clear that Keyman was not using the font, because it showed tofu (as you'd expect with DisplayMap). Updating the Keyboard Fonts / On Screen Keyboard font to KbdHebr, it worked; this sets the Font property in the .kvks:

<encoding name="unicode" fontname="KbdHebr" fontsize="9">

However, from my memory, the font specification is intended to be from the .kps, and has been thus for a long time. The details in Keyboard Fonts dialog are intended for development-time use only.

@LornaSIL this relates to your experience with using &DisplayMap communicated recently via email.

MattGyverLee commented 10 months ago

Anecdotally, I've had issues with mobile keyboards (not sure about OSK) added to Dictionary and Scripture app not respecting keyboard fonts if they were compiled with outside-the-project font paths like ../../../shared/fonts/... Since the server-side change, I keep a local copy with internal fonts for export with apps.

mcdurdin commented 10 months ago

Anecdotally, I've had issues with mobile keyboards (not sure about OSK) added to Dictionary and Scripture app not respecting keyboard fonts if they were compiled with outside-the-project font paths like ../../../shared/fonts/... Since the server-side change, I keep a local copy with internal fonts for export with apps.

This should not be possible. The compiled keyboard package .kmp does not have any paths -- it's all flattened into a single zip folder. If you can get a repro, then please open an issue on that so we can resolve this.

mcdurdin commented 9 months ago

This is a significant change so I think I'd like to bump it to 18.0 now.