Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Delete Microsoft YaHei (#4173) #5983

wants to merge 1 commit into from

Conversation

xps2
Copy link

@xps2 xps2 commented Feb 6, 2019

@codecov-io
Copy link

Codecov Report

Merging #5983 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
models/repo_list.go 64.55% <0%> (+1.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da1edbf...577977a. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 6, 2019
@lafriks lafriks added type/bug topic/ui Change the appearance of the Gitea UI labels Feb 7, 2019
@lafriks lafriks added this to the 1.8.0 milestone Feb 7, 2019
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 7, 2019
@lunny
Copy link
Member

lunny commented Feb 7, 2019

For a temporary fix, this is OK. We should define different fonts for different languages for a perfect UI. Microsoft YaHei is beautiful than Arial on Chinese language. I think the similar situations are also in other languages.

@zeripath
Copy link
Contributor

zeripath commented Feb 7, 2019

The Han unification problem strikes again!

@zeripath
Copy link
Contributor

zeripath commented Feb 7, 2019

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?

@sapk
Copy link
Member

sapk commented Feb 7, 2019

It seems (from the live demo) that settings the lang attribute well should fix the problem.

@lunny
Copy link
Member

lunny commented Feb 7, 2019

We should add missing lang attribute on <html lang='en/cn'> according UI languages at least.

@sapk
Copy link
Member

sapk commented Feb 7, 2019

Following @lunny comment we could also use the attr [lang=lang_id] to select a font to use based on lang.

@xps2
Copy link
Author

xps2 commented Feb 7, 2019

Microsoft Yahei is a Chinese font, but it is also installed by default in the Windows Japanese environment.
However, since Japanese Kanji and Chinese characters have different shape, Japanese speakers feel uncomfortable. (See also #4173)
For Chinese speakers, Meiryo UI will feel uncomfortable as Japanese speakers feel uncomfortable with Microsoft Yahei. (cf. fd3b9ca)
Therefore, I submitted this PR.
In case of non-Windows environment there is no problem, please do not force Microsoft Yahei.

@zeripath
Copy link
Contributor

zeripath commented Feb 7, 2019

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 :lang(zh-hans) and so on.

@xps2
Copy link
Author

xps2 commented Feb 7, 2019

I agree to put Microsoft Yahei as the default value for Chinese.
However, since each of CJK's glyph may be different, I do not agree to put Microsoft Yahei in default values for all languages.
e.g. https://ja.wikipedia.org/wiki/CJK統合漢字#/media/File:CJKV_variant_glyphs.png

CJK unified ideographs is very difficult…

@sapk
Copy link
Member

sapk commented Feb 7, 2019

@xps2 Yes that what @zeripath suggest also at the end.

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 :lang(zh-hans) and so on.

It will not drop down Chinese user experience and keep the default font for others (or add more in an other PR).

@silverwind
Copy link
Member

silverwind commented Feb 9, 2019

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:

-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol
SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace

@lunny
Copy link
Member

lunny commented Feb 10, 2019

@silverwind there is a new PR #6007 sent by @zeripath will try to give different font stack according UI languages.

@techknowlogick
Copy link
Member

Thanks for PR @xps2. I am going to close this in favour of #6007

@techknowlogick techknowlogick removed this from the 1.8.0 milestone Feb 12, 2019
@xps2
Copy link
Author

xps2 commented Feb 16, 2019

@techknowlogick OK👍

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants