-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Delete Microsoft YaHei (#4173) #5983
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5983 +/- ##
==========================================
+ Coverage 38.79% 38.79% +<.01%
==========================================
Files 330 330
Lines 48729 48729
==========================================
+ Hits 18904 18906 +2
+ Misses 27085 27083 -2
Partials 2740 2740
Continue to review full report at Codecov.
|
For a temporary fix, this is OK. We should define different fonts for different languages for a perfect UI. |
The Han unification problem strikes again! |
I don't know enough about the yahei font. It doesn't have the kanji and traditional variants? Are we definitely setting the appropriate lang attribute on the html element as per: https://www.growingwiththeweb.com/2014/03/languages-and-chinese-characters-on-the-web.html Can we leverage lang specific font-family in CSS? |
It seems (from the live demo) that settings the lang attribute well should fix the problem. |
We should add missing lang attribute on |
Following @lunny comment we could also use the attr [lang=lang_id] to select a font to use based on lang. |
Microsoft Yahei is a Chinese font, but it is also installed by default in the Windows Japanese environment. |
Yes xps2 I understand that displaying the wrong glyph will make people feel uncomfortable - however, I think simply removing the font isn't going to be the answer to this. If we aren't setting the correct lang attribute it's likely that forms of the UniHanned glyphs will be unpredictable - so therefore we need to set this. Now, the question comes as to whether YaHei has the other forms - it appears not from what you're saying therefore we will need to use lang specific css as our Chinese colleagues think that YaHei provides nice font-forms in Simplified Chinese. So how can we do that? Well there's the lang pseudo-selector on CSS which appears to have relatively good support: https://developer.mozilla.org/en-US/docs/Web/CSS/:lang so perhaps we need to add that to the CSS. Is "Meiryo Ui" a nice Japanese font? - We could add that back in wrapped into :lang(ja) {
body {
font-family: "Helvetica Neue", "Meiryo Ui", Arial, Helvetica, sans-serif !important;
}
} Presumably, YaHei also doesn't have traditional Chinese or Korean forms? If so we should probably move it out of the default body and stick it in a |
I agree to put Microsoft Yahei as the default value for Chinese. CJK unified ideographs is very difficult… |
@xps2 Yes that what @zeripath suggest also at the end.
It will not drop down Chinese user experience and keep the default font for others (or add more in an other PR). |
Has thought been given about using a native font stack? I generally prefer them because there is no flash of invisible text on uncached page loads. I've been using Bootstrap's font stack with good results for english texts, not sure if it's suitable for japanese. Also, Github's current font stacks:
|
@silverwind there is a new PR #6007 sent by @zeripath will try to give different font stack according UI languages. |
@techknowlogick OK👍 |
#4173