fix(theme): strip system-ui from font-family-base#4988
fix(theme): strip system-ui from font-family-base#4988tats-u wants to merge 12 commits intovuejs:mainfrom
Conversation
|
|
||
| :root:where(:lang(zh)) { | ||
| --vp-font-family-base: | ||
| 'Punctuation SC', 'Inter', ui-sans-serif, system-ui, sans-serif, |
There was a problem hiding this comment.
Why was this removed? I think it's still needed because otherwise the punctuation will use Inter instead of Chinese font. 👀
There was a problem hiding this comment.
the punctuation will use Inter instead of Chinese font
Do you know which characters/code points are affected? I think it also occurs in Japanese and they should be removed from Inter if possible.
I suppose it is better to respect sans-serif there instead of using a custom font.
There was a problem hiding this comment.
Possible candidates:
“
”
‘
’
…
—
There was a problem hiding this comment.
Yes, these -
vitepress/src/client/theme-default/styles/fonts.css
Lines 157 to 159 in 7658ad3
There was a problem hiding this comment.
I found the range of Inter is also defined by us. Let's add a new @font-face variant for CJK languages.
There was a problem hiding this comment.
There was a problem hiding this comment.
U+007E, U+002F
Do you know why they were added? I think they should be dedicated to zh(-Hans) if they remain.
There was a problem hiding this comment.
There was a problem hiding this comment.
Oh, it's the great clreq. It claims that it also covers traditional Chinese. I will follow it in both simplified and traditional Chinese.
I will adopt it in Japanese. Also I will enable |
This comment was marked as outdated.
This comment was marked as outdated.
|
I will defer |
commit: |
|
Can I continue to use |
|
|
|
Glad to know it. |
|
@brc-dd Is there anything blocking you from merging this PR? |



Description
system-ui has some problems on rendering CJK text especially long paragraphs like contents suitable for Vitepress. sans-serif may be an older font stack especially in Euro-American language, but does not have such problems.
sans-seriftosystem-uiin default fonts #4946system-uibehavior is undesired for some users w3c/csswg-drafts#3658system-uiin articles, documents, and blogs mdn/content#41244Linked Issues
Fixes #4946
Fixes #5018
Additional Context
Before
Taken in Japanese Windows
Inappropriate 将/将 glyph & han characters with uneven thickness:
Too condensed and quirky hiragana & katakana:
After
Future work
Additional font kerning settings may be preferred in headings and menus in Japanese (an additional PR).
Tip
The author of this PR can publish a preview release by commenting
/publishbelow.