Re: [csswg-drafts] [css-fonts] `system-ui` behavior is undesired for some users (#3658)

You keep saying actual, practical issues are "non-issue" because "that's what MS should fix", "that's what XXX should fix", that's a frustrating way to constructively discuss anything.

> This is non-issue .... This is a legacy problem 
> Font support (in Microsoft YaHei) from its vendor Microsoft is required to fix this "problem", and not a problem of system-ui.

The full-width curly quotes isn't an issue of MS YaHei, which is supposed to be a Chinese font. It's totally fine for it to have full-width quotes. The issue is you force to use MSYH on pure English content, which is what system-ui on Chinese Windows does. 

> If you are designing for ... multilingual use,

I'm literally taking about the issue of `system-ui` caused on English-only or English-majority content.

> However, I failed to recreate this issue. system-ui with language tagging works just fine on pure English Windows.

???? The whole discussion is about issues of `system-ui` for Chinese Windows (or Japanese Windows) and now you test on English Windows? 

Of course it doesn't happen with English Windows, because its "system-ui" is Segoe UI, which don't have CJK glyphs and will fallback to a different Chinese/Japanese fonts for that. The whole point of "system-ui bad" is because on Chinese Windows the default font (MSYH) has too large character set and will be used to display anything, even when improper.

> this alone shouldn't be an issue to block websites from using system-ui as the issue is vendor-specific

Previously you said these are non-issues that shouldn't block because it only affect a small, niche, classic theme users (quote: "Do be noted that this 'issue' only arises when the user voluntarily choose to use the Classic theme"), and I pointed it out it actually affects all the Chinese/Japanese Windows users. And now you moved the goalposts to say "Chinese, Windows users are too small to block".

> Also, I will argue that displaying the correct localization with correct font when no language tag is present is more important than displaying the best visual result when no language tagging is done. You definitely do not want Meiryo to overrride the Chinese part
> by default, Meiryo is overriding Microsoft YaHei in regedit

I already said, will example, if you use `sans-serif`, this won't very happen. Chrome will pick characters based on the priority of your locale setting. Even if you're using English Windows. Your screenshot confirms it. Not sure how it has anything to do with regedit. Go ahead and change your language priority in Chrome. You will see changes immediately in real-time: 

![image](https://user-images.githubusercontent.com/4130991/192898034-81232261-7eb3-402c-a473-3d08c703ff98.png)
Result (remember to refresh): 
![image](https://user-images.githubusercontent.com/4130991/192898124-36ea40db-24d5-443c-bce0-0045cdd05537.png)

![image](https://user-images.githubusercontent.com/4130991/192898173-ac4b7e1b-0533-40fd-b5ae-450736c2eb63.png)
Result (remember to refresh): 
![image](https://user-images.githubusercontent.com/4130991/192898195-0d848bc9-971e-4cde-9adb-e91a94e9f41c.png)

This problem actually WILL happen, in a different way, when you use `system-ui` in CJK Windows. If you use Japanese Windows + `system-ui`, Meiryo WILL override Chinese part (as soon as it has these glyphs)`, just like if you use Chinese Windows MS Yahei WILL overwrite Kana part). 

> Using system-ui will ensure the correct locale is displayed based on system settings

Again, totally false. And this point, I feel like you don't know, or have thoroughly tested, how `system-ui` or font fallback works. Since you use Chrome, here is how it works in Chrome:

* `system-ui` works by simply applying MSYH (Simp. Chinese), Yu Gothic UI or Meiryo (Japanese), or Segoe UI (English) to all the content, regardless if here is language tag or not.
* `sans-serif` on the other hand is language-aware. It uses the sans-serif font in corresponding settings for each language if lang tag is set. By default, if you use `sans-serif` + lang=hans, it will apply MSYH to all the content. Same goes to other languages. 
* If a character does not exist in the given font, it will fallback to a bigger set. 
* For ambiguous cases (like 将/甩) Chrome will prioritize what the users prefers based on language settings. 

The problem with `system-ui` on Chinese Windows is, MSYH have all the glyphs. Once it is set, it will override virtually everything, language tagged or not. This won't happen if you are using English Windows, because its system-ui font doesn't have CJK characters. It won't happen if you just use `sans-serif` instead, either.

The issue that "on English Windows, untagged content will use Meiryo to display Chinese characters instead of MSYH" you mentioned is because the locale isn't properly set. So Chrome have nothing to work with, and it picks Japanese over Chinese. This can be easily fixed by making sure Chinese locale has higher priority than Japanese, as said above.

You don't need system-ui to 'fix' this: because on English Windows all it does is just to apply Segoe UI on all the content and then it relies on font fallback to do the reset of the job. The same can be archived by using any English font - like `sans-serif` (which isn't a real font, but it will use Arial).

TL;DR: `system-ui` isn't what fixed your "Chinese characters in Meiryo" issue. And it causes all the other issues on Chinese and Japanese Windows simultaneously. 

> There is no point to replace system-ui for something you want

I.. what?

> all sites must stop using system-ui, 
> CSS should drop support for system-ui

No one is suggesting any of these. 

> shove your opinion through all other user's throat

No one is doing that, either. All the websites listed above are too big to not deal with `system-ui`'s drawbacks, because they have sizable Chinese users. Which is exactly why they "do write your own font stack" as you suggested. 

> If system-ui is so bad, what alternatives do you suggest for replacing

Just use `sans-serif`? Or even just stick with this long mess. Yes it sucks `system-ui` didn't magically work in all cases but that's the reality. 

-- 
GitHub Notification of comment by fireattack
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3658#issuecomment-1261532351 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 28 September 2022 22:35:55 UTC