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

I would argue that the current implementation of `system-ui` is on point and should be kept that way; the issue pointed out by https://infinnie.github.io/blog/2017/systemui.html is a non-issue.

> On Windows Vista/Windows 7 and corresponding Windows Server versions, with the Windows Classic theme turned on, one might see the good decades-old Tahoma/SimSun/PMingLiUā€¦ for system-ui to evaluate to (replicated on Windows Server 2008 R2 in Simplified Chinese).

What this section missed ***in context*** is that, the *system font itself* is also changed (to the uglier but clearer bitmap font, which is SimSun for Simplified Chinese system) when the theme changed, so what `system-ui` evaluates to be _does_ indeed match the current system font. The following provides screenshots for the actual Windows 7 system, please notice the font used by the file names on the desktop and Windows Explorer.

Windows 7 Aero theme, using Microsoft YaHei:
![Aero theme](https://user-images.githubusercontent.com/33471049/133435080-9af8c691-8eb8-447e-b59f-89c632ed0ed2.png)
Windows 7 Classic theme, using SimSun:
![Classic theme](https://user-images.githubusercontent.com/33471049/133435089-b9af98d7-65ce-426d-b965-4b09e2c7911b.png)

<details>
  <summary>`index.html` source code</summary>

```html
<html>
<style>
body{
font-family: system-ui;
}
</style>
<body>
Testing text using <code>system-ui</code>. This page is displayed with Google Chrome.
</body>
</html>
```

</details>

This is an "issue" with Windows rendering engine, not with the CSS specs. Display for CJK (and corresponding Latin text in their languages) has been using bitmap fonts for a long time, and in places where clarity is required, using bitmap font is better than using newer system fonts (considering there is still a relatively large CRT moniter user group in China).

> If the Windows system font really is ugly in Chinese, what do Chinese native apps do?

On Windows 7 and earlier, there are two ways:
1. keep the original system font (or don't specify in software), which uses SimSun ***if using the Classic theme***
2. hardcode the new system font (Microsoft YaHei) in software, which will not change when changing theme

I am unable to test on Windows 8 and later due to single display language pack limitation, but I would guess the High Contrast settings might result in the same behaviour (Chinese font reverted to bitmap font, i.e. SimSun/PMingLiU for high contrast theme for display clarity).

Do be noted that this "issue" only arises when the user *voluntarily* choose to use the Classic theme (Windows 7 & lower)/High Contrast settings (Windows 8 & higher), which is a correct response as the user might intend to use the theme/settings for their individual requirements. We as developer should in no way work against the choices users had made, even though it might look worse for us (but not them).

Thus, my conclusion is:
**1. The Windows system font really is terrible in some situations**, but intended. There is no reason to stop using/implementing `system-ui`, and with Firefox adding support in August 2021 (https://github.com/mdn/content/issues/7751), there is literally nothing stopping the usage of `system-ui`.

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


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

Received on Monday, 26 September 2022 15:56:46 UTC