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

Font Family based on Culture Info #260

Open
Sofiya-kumar opened this issue Sep 27, 2023 · 4 comments
Open

Font Family based on Culture Info #260

Sofiya-kumar opened this issue Sep 27, 2023 · 4 comments
Assignees

Comments

@Sofiya-kumar
Copy link
Collaborator

As of now, we have the open sans as the default font family for all cultures.

But Chinese culture does not support open sans. Have to check this

@ElishaSamPeterPrabhu
Copy link
Collaborator

Test : Added this code to change the culture to the chinese version.
CultureInfo.CurrentCulture = new CultureInfo("zh-CN", false);
Gave Chinese text as input for button to test in the maui App
Screenshot_1695903289

Result : No Crashes or errors occurred.

@rthanga1
Copy link
Collaborator

@Sofiya-kumar Can you work with Sam and help him understanding the issue?

@shanet72
Copy link

shanet72 commented Oct 3, 2023

So, what you are probably seeing is the results of font substitution (see, for example, https://learn.microsoft.com/en-us/globalization/input/font-technology#font-substitution) , where the OS will automatically use a similar font when it can't find the requested character in the current font. However, there is no guarantee that it will substitute it with the correct font.

As noted in the Modus typography guidelines (https://modus.trimble.com/foundations/typography/), you should use Noto fonts for those languages that have been translated, which is what Siteworks uses for those Eastern languages. However, they also note that there are a variety of technical and performance reasons for people to need to use other fonts, so, again, flexibility is important here.

Also, using the current UI culture to determine the font to use does not work in all use cases. For example, in Siteworks, we use the current UI culture to determine the ",", "." settings to use when representing numbers, for example, not just for display purposes but also data import/export. Often times, this is regional based (like, use the number settings for the German region). However, the user maybe isn't German, but is an immigrant worker from a nearby country and speaks a different language. So, we allow them to change the language for the translated text in the software without affecting the culture setting used for the other settings.

Defaulting at startup to the font based on the current UI culture I think is fine, as long as there is an easy way in the style sheets for the developer to override it.

@shanet72
Copy link

shanet72 commented Oct 3, 2023

You can view what actual character sets are in a font by using the "Character Map" (charmap) program built into Windows. You can change the character set to see which characters are available for particular languages. The Unicode character set is going to show them all generally. If you do that for Open Sans, you will see it has no Asian or Arabic characters in its font.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do
Development

No branches or pull requests

4 participants