Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(web): key previews use incorrect font #9187

Closed
3 of 8 tasks
jahorton opened this issue Jul 5, 2023 · 3 comments · Fixed by #7324
Closed
3 of 8 tasks

bug(web): key previews use incorrect font #9187

jahorton opened this issue Jul 5, 2023 · 3 comments · Fixed by #7324
Assignees
Labels
bug m:osk On Screen Keyboard or Touch Keyboard, all platforms web/
Milestone

Comments

@jahorton
Copy link
Contributor

jahorton commented Jul 5, 2023

Describe the bug

When pressing a key on a touch form-factor OSK, the key preview uses the incorrect font. Fortunately, the keys and the subkey menu are both fine and do use the correct font - it's just the key preview that's wrong.

The most prominent example I've found so far for this: using the iOS Keyman app and sil_cameroon_azerty, note the difference between the j keycap and its key-preview text:

IMG_2806 cropped

IMG_2807 cropped

While the a would be even more obvious, it's extremely difficult to take a screenshot before its longpress menu appears on a phone. Reproducing this on my laptop via app/browser-Web's inlined-OSK feature:

image

Compare that a to what you see in the two screenshots before it; the difference should be obvious.

Reproduce the bug

  1. Load / install sil_cameroon_azerty or sil_cameroon_qwerty.
  2. Press and hold the j key.

Other keys - like a - will also work, but note that if the key supports longpresses, it won't remain displayed long.

Expected behavior

The key-preview font should match that of its base key.

Related issues

No response

Keyman apps

  • Keyman for Android
  • Keyman for iPhone and iPad
  • Keyman for Linux
  • Keyman for macOS
  • Keyman for Windows
  • Keyman Developer
  • KeymanWeb
  • Other - give details at bottom of form

Keyman version

17.0.134-alpha

Operating system

No response

Device

No response

Target application

No response

Browser

No response

Keyboard name

sil_cameroon_azerty

Keyboard version

Current / shouldn't matter

Language name

Any

Additional context

No response

@darcywong00
Copy link
Contributor

Debugging longpress keys on SHIFT:

keyboard.html#showMore-14+keyPos=21,106+keys=default-T_new_206:\u002A\u0041\u006C\u0074\u002A;default-T_new_205:\u002A\u0043\u0074\u0072\u006C\u002A;default-T_new_207:\u002A\u0043\u0061\u0070\u0073\u002A;default-T_new_208:\u002A\u0041\u0042\u0043\u002A;default-T_new_209:\u002A\u0061\u0062\u0063\u002A;default-T_new_210:\u002A\u0053\u0079\u006D\u0062\u006F\u006C\u002A;default-T_new_211:\u002A\u0041\u006C\u0074\u0047\u0072\u002A;default-T_new_212:\u002A\u004C\u0041\u006C\u0074\u002A;default-T_new_258:\u002A\u0052\u0041\u006C\u0074\u002A;default-T_new_259:\u002A\u004C\u0043\u0074\u0072\u006C\u002A;default-T_new_260:\u002A\u0052\u0043\u0074\u0072\u006C\u002A;default-T_new_261:\u002A\u004C\u0041\u006C\u0074\u0043\u0074\u0072\u006C\u0053\u0068\u0069\u0066\u0074\u002A;default-T_new_262:\u002A\u0052\u0041\u006C\u0074\u0043\u0074\u0072\u006C\u0053\u0068\u0069\u0066\u0074\u002A;default-T_new_263:\u002A\u0041\u006C\u0074\u0053\u0068\u0069\u0066\u0074\u002A;default-T_new_264:\u002A\u0043\u0074\u0072\u006C\u0053\u0068\u0069\u0066\u0074\u002A;default-T_new_265:\u002A\u0041\u006C\u0074\u0043\u0074\u0072\u006C\u0053\u0068\u0069\u0066\u0074\u002A;default-T_new_266:\u002A\u004C\u0041\u006C\u0074\u0053\u0068\u0069\u0066\u0074\u002A;default-T_new_267:\u002A\u0052\u0041\u006C\u0074\u0053\u0068\u0069\u0066\u0074\u002A;default-T_new_268:\u002A\u004C\u0043\u0074\u0072\u006C\u0053\u0068\u0069\u0066\u0074\u002A;default-T_new_269:\u002A\u0052\u0043\u0074\u0072\u006C\u0053\u0068\u0069\u0066\u0074\u002A;default-T_new_292:\u002A\u0053\u0068\u0069\u0066\u0074\u004C\u006F\u0063\u006B\u002A;default-T_new_293:\u002A\u0053\u0068\u0069\u0066\u0074\u0065\u0064\u004C\u006F\u0063\u006B\u002A

I would expect url to include +font=... to enforce using keymanweb-osk.ttf.

@mcdurdin
Copy link
Member

The font data should be available in kmp.json already -- after all, Keyman for Android is passing it in to keymanweb!

@mcdurdin mcdurdin modified the milestones: A17S20, A17S21 Sep 1, 2023
@mcdurdin mcdurdin modified the milestones: A17S21, A17S22 Sep 15, 2023
@mcdurdin mcdurdin added the m:osk On Screen Keyboard or Touch Keyboard, all platforms label Sep 16, 2023
@mcdurdin mcdurdin modified the milestones: A17S22, A17S23 Oct 1, 2023
@mcdurdin mcdurdin modified the milestones: A17S23, A17S24 Oct 15, 2023
@jahorton jahorton modified the milestones: A17S24, A17S25 Oct 16, 2023
@mcdurdin mcdurdin modified the milestones: A17S25, A17S26 Nov 13, 2023
@darcywong00 darcywong00 modified the milestones: A17S26, A17S27 Nov 27, 2023
@jahorton jahorton linked a pull request Dec 8, 2023 that will close this issue
1 task
@jahorton
Copy link
Contributor Author

jahorton commented Dec 8, 2023

This issue does not appear to exist on the feature-gestures branch; I did put in significant effort to handle related styling in #9825, I believe. Not sure if I can fully credit the fix to that one PR, though.

@mcdurdin mcdurdin modified the milestones: A17S27, A17S28 Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug m:osk On Screen Keyboard or Touch Keyboard, all platforms web/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants