Large blank space around the ratio symbol in time when the system locale is zh-*
Affected version
OS distribution: Fedora 34 & 35 beta, Ubuntu 21.10 beta
GNOME Shell version: 40.4, 40.5, 41.0
Both XOrg and Wayland, likely irrelevant
Bug summary
There are large blank spaces before and after the ratio symbol (∶) in time (top bar clock and various places in the notification panel, lock screen clock, etc) when the system locale is one of zh-CN, zh-HK, or zh-TW.
Steps to reproduce
- In "Settings" – "Region & Language", change "Language" to "中文 台灣", "中文 香港", or "汉语 中国".
- Log out & log in.
What happened
There is excessive space around the ratio symbol.
What seems to be happening here: The default font for Chinese characters in zh-* locales is Noto Sans CJK. It uses full-width glyths for symbols like the ratio sign. But somehow gnome-shell decides to use this font instead of the default Cantarell font to display the time (as well as the month and day, if that matters).
What did you expect to happen
The displayed style of the time should be similar to that in English locales, without the additional space.
Possible solutions could be:
- Let gnome-shell always use Cantarell for time. This is what MacOS seems to be doing. It uses SF Pro (default font for English) instead of PingFang (default font for Chinese) for numbers and symbols.
- Use colon (:) instead of ratio (∶) for these locales. This is what Windows seems to be doing.
I think the first one is preferable, especially when gnome-shell is already using Cantarell instead of Noto Sans CJK for Latin script (expected, see the text "event" and "London" in the screenshot). The second one would result in the separator not vertically aligned to the center with the numbers, but slightly lower.
Relevant logs, screenshots, screencasts etc.
See the following screenshot for an example in zh-TW locale: