keymanapp / keyman

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

feat: Are there solutions in KeymanWeb to let the user choose a better font if the given one has issues? #4870

Open darcywong00 opened 3 years ago

darcywong00 commented 3 years ago

@merchako had this question from a Slack channel:

are there solutions in KeymanWeb to let the user choose a better font if the given one has issues?

In a usability test with a Sinhala translator last night (video recording at 32:50), the user had issues with the font displaying character combinations incorrectly (dotted circles). She knew specific fonts that work well, and she doesn’t have this issue when using Google Translate’s interface.

Does Keyman provide any ways for the user to pick alternative fonts, or for the web developers to add additional fonts? I wasn’t able to find information about such a feature in the docs.

image

@mcdurdin replies:

That sounds more like input order than font issues. Dotted circles appear when there is a letter that expects a base letter, for example a diacritic on a letter in Latin script.

mcdurdin commented 3 years ago

Note: this is not a keymanweb.com query, rather a Keyman Engine for Web query.

jahorton commented 3 years ago

There is presently no such mechanism. So... I'm treating this as a "feature request".

This is partly due to an email conversation I've had with another user, where a web developer was trying to override a keyboard's font. The context seems a bit different, leading me to think that this implies a separate user sent that email... meaning we've had two different users ask very similar questions.

Worth noting: the email-question was for a developer to supply a different font to their users, not for any random user of KMW to swap fonts from what the page itself provides. A subtle, but important-to-note distinction.

Of course...

@mcdurdin replies:

That sounds more like input order than font issues. Dotted circles appear when there is a letter that expects a base letter, for example a diacritic on a letter in Latin script.

Any solution should probably keep this in mind.

merchako commented 3 years ago

Thanks for managing this feature request, @jahorton. I agree that this feature request should be taken lightly. This is not some ironclad, must-have feature for us. In light of @mcdurdin's observations, we're still figuring out what the true need is here.

If indeed font switching is needing, I wouldn't expect the user to pick any font. Rather, the user would pick from a short list of fonts that some combination of:

  1. known- or expexted-good fonts curated by Keyman, and
  2. known- or expexted-good fonts added and supplied (or pointed to) by the developer.
devosb commented 1 year ago

@mcdurdin is correct that input order is an issue here. The character (U+0DD9 SINHALA VOWEL SIGN KOMBUVA) causing the issue is a vowel sign that visually comes before the consonant, but in Unicode is stored after the consonant. The keyboard used in the video presumably outputs Unicode, so unless the keyboard does reordering, this vowel sign needs to be typed after the consonant. The user typed the vowel sign before the consonant, and this vowel sign expects a base character (consonant in this case) to be present.

The font the user mentioned as working well, AFAIKT, is a hacked legacy encoded font. So when typing with that font (and the characters in the legacy font are all or almost all ASCII, so a typical QWERTY layout can be used) this vowel would need to be typed in visual order (that is before the consonant). Hence the confusion of the user.

Even if a font could be specified, you will have to handle two different encodings (Unicode and the hacked, legacy encoding). The mapping between two in this case (and many other in this part of the world) is not one-to-one, so a simple mapping table is not sufficient.

After I chatted on Slack about this issue in 2021 I looked at Google Translate. For Sinhala (and some other Indic languages I looked at) Google Translate seems to provide an input method editor (IME) that you would use a QWERTY layout to interact with. In this case, you are not really using a Sinhala keyboard, so you would not see a dotted circle with incorrect typing. I am not sure how the IME would handle the vowel sign reordering, that is, does the IME expect visual or logical order?

WSTech now has a service to provide a good font for a given language that should help with the comments made by @merchako in https://github.com/keymanapp/keyman/issues/4870#issuecomment-825855238

merchako commented 1 year ago

Got a link to WSTech's good font service, @devosb ?

DavidLRowe commented 1 year ago

@merchako I'll gladly send you privately a link to the beta version of the service, but I'd rather not publish here a URL that I know will be obsolete within a fortnight.