microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.73k stars 29.09k forks source link

Use proper font family for East Asian languages (CJK) #5260

Closed be5invis closed 8 years ago

be5invis commented 8 years ago

image

Electron assigns a serif font, SimSun, as the default sans-serif font for zh-CN. This is extremely inconsistent.

A workaround may be

whatever:lang(zh-CN) {
    font-family: <your current setting>, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}
whatever:lang(zh-TW) {
    font-family: <your current setting>, "PingFang TC", "Microsoft JhengHei", "Source Han Sans TC", sans-serif;
}
be5invis commented 8 years ago

@anyong My stylesheets does not contain Noto Sans CJK. For Source Han Sans, it is after Windows fonts so on Windows it will not be used (and most users will not install them).

ghost commented 8 years ago

@be5invis

I have installed PingFang and Noto Sans, they are blur on my screen.

For other os, because of copyright, only few user installed YaHei, adjust fonts order will not cause any bad change

EDIT: Noto Sans is ok, so, just keep it at origin place, adjust other?

grazies commented 8 years ago

Cool

YOTOV LIMITED[😏]


From: ArianeLu notifications@github.com Sent: 21 April 2016 17:23 To: Microsoft/vscode Subject: Re: [Microsoft/vscode] Use proper font family for East Asian languages (CJK) (#5260)

@bpaserohttps://github.com/bpasero

I think this one is best for zh-cn:

"Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", "Microsoft Yahei UI", "Microsoft YaHei", "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", "WenQuanYi MicroHei" ,sans-serif

YaHei UI available in Win8+, may better than YaHei WenQuanYi MicroHei is for CentOS/SUSE, better than use UKai(i dont know why it will be set as default font of sans-serif in some linux)

If linux/mac user installed YaHei, text still beautiful and clear, but other font is not clear/blur on Windows(except hi-dpi)

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHubhttps://github.com/Microsoft/vscode/issues/5260#issuecomment-212994006

anyong commented 8 years ago

@ArianeLu You have Noto Sans (a latin alphabet font) listed after the CJK fonts - that doesn't make any sense. Latin fonts should come first, because the latin characters in CJK fonts are notoriously bad.

be5invis commented 8 years ago

@ArianeLu Your problem is caused by PingFang, not Noto. And you forgot Office for Mac.

ghost commented 8 years ago

@be5invis So, We just need add Microsoft YaHei UI, WenQuanYi, and move PingFang?

Good night , everyone in Asia(UTC+8, 0:36)

be5invis commented 8 years ago

@ArianeLu @bpasero Hmmm, maybe rearrangement is acceptable, since the original CSS's Latin part is also in the "Windows -- OSX -- Linux" order. So this:

  • For zh-CN : font-family: "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", "Noto Sans", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif
  • For zh-TW : font-family: "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", "Noto Sans", "Microsoft Jhenghei", "PingFang TC", "Source Han Sans TC", "Source Han Sans", "Source Han Sans TW", sans-serif
  • For ja : font-family: "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", "Noto Sans", "Meiryo", "Hiragino Kaku Gothic Pro", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", "Sazanami Gothic", "IPA Gothic", sans-serif
  • For ko : font-family: "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", "Noto Sans", "Malgun Gothic", "Nanum Gothic", "Dotom", "Apple SD Gothic Neo", "AppleGothic", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif

is acceptable either.

bpasero commented 8 years ago

@be5invis I am relying on you guys telling me the best option. I can make such a change in the font-family list easily tomorrow.

bpasero commented 8 years ago

Pushed the suggestion from https://github.com/Microsoft/vscode/issues/5260#issuecomment-213006409

aeschli commented 8 years ago

I verified that for the explorer we now use a 'zh-Hans' specific font.