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

No font options available for Braille (-Brai) #19

Closed
imnasnainaec opened this issue Apr 25, 2024 · 10 comments
Closed

No font options available for Braille (-Brai) #19

imnasnainaec opened this issue Apr 25, 2024 · 10 comments

Comments

@imnasnainaec
Copy link
Contributor

Many major languages have a -Brai script option for Braille; selecting this results in an empty font list.

@imnasnainaec
Copy link
Contributor Author

imnasnainaec commented Apr 25, 2024

Perhaps the "safe fonts" could be a fallback when no fonts are offered.

@gtryus
Copy link
Contributor

gtryus commented Apr 29, 2024

I think we should give this feedback to wsTech. When I query lff with en-Brai (https://lff.api.languagetechnology.org/lang/en-brai) I get this response: {"defaultfamily":[""],"apiversion":0.3,"families":{"":{"family":"","familyid":""}}} so I think the language picker is returning the correct results and if it should return a different response, this should be indicated by the lff.

@imnasnainaec
Copy link
Contributor Author

imnasnainaec commented Apr 29, 2024

I'm giving feedback there when I find good options:

I was wondering if you'd want a fallback when the api gives no options. And if not, that's perfectly find---you can close this issue.

@gtryus
Copy link
Contributor

gtryus commented Apr 30, 2024

If there are no recommended fonts, should we hid the font choice control? Should we not call setFont call back if there is no font?

@imnasnainaec
Copy link
Contributor Author

Hmm, good questions.

I'm guessing a disabled dropdown with some "No recommended fonts" text would be less confusing than having the whole control disappear.

I don't immediately see any harm in letting setFont be called with an empty string, but I've not thought of a good use case that would decide it one way or the other.

@gtryus
Copy link
Contributor

gtryus commented Apr 30, 2024

I like the idea of calling setFont anyway (at least) since if the user picked a language with a font and are now editing their choice, you don't want the old font to be retained.

Disabled controls are tricky since there is no easy way to make the "No recommended fonts" message appear... (Titles and hovering is also disabled when the control is disabled.)

@gtryus
Copy link
Contributor

gtryus commented Apr 30, 2024

I could put a little information (i) after the control if it is disabled with the text on that. Does that sound like a good idea?

@imnasnainaec
Copy link
Contributor Author

You could have the select prop in https://github.com/sillsdev/mui-language-picker/blob/master/src/LanguagePicker.tsx#L512 conditional on whether fontOpts is empty.

@gtryus
Copy link
Contributor

gtryus commented Apr 30, 2024

ok, I made this change and merged to master branch.

@gtryus gtryus closed this as completed Apr 30, 2024
@imnasnainaec
Copy link
Contributor Author

5a41dd5 looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants