-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Use proper font family for East Asian languages (CJK) #5260
Comments
Hi @be5invis, I guess you have either installed additional fonts (such as Monaco) or modified the FontSubstitutes registry settings or so. I have the default font set and VSCode falls back to Consolas in the editing area. It looks OK. However, in the explorer area the text looks a little blurry, but can be fixed by increasing the font-size to 12px. Please note the difference between two Chinese lines in the image below, 资源管理器 (original) and 工作文件 (up-sized to 12px). I guess it's because at 12px SimSun performs well with raster glyphs instead of vector ones, which can be quite blurry at small sizes. |
@jackqq The edit area uses Inziu Iosevka SC. What I am talking about is the font used in the UI, instead of the editing area, since it is configurable, and you can actually set to ANY fallback sequence you want. |
@bpasero I move this to you. If we should set different fonts in the explorer depending on the UI language you can use the API vs/base/common/platform#language to know the languge used for the UI. |
@dbaeumer the original bug report is about the editor though? if there are multiple issues discussed in here I suggest to split them up by topic. |
@bpasero This issue has no relationship with the editor. It's just the “UI”. Actually we can specify the fallback sequence for the editor. |
@be5invis in your screenshot, you say the font in the explorer is broken? it looks good to me. |
@be5invis can you try the workaround you describe to see if it helps? |
@be5invis does it work adding those other fonts you mentioned in your comment? |
@bpasero If I manually add fonts to |
@be5invis ok thanks! |
@dbaeumer is |
I would appreciate if people could tell the |
@bpasero That's exactly what I suggested. .monaco-shell:lang(zh-CN){
font-family: ...; /* Chinese fallback sequence*/
}
.monaco-shell:lang(ja){
font-family: ...; /* Japanese fallback sequence */
} |
@bpasero Hold on i am installing |
|
Ok nice. |
I will check zh-Hant-TW later.
|
Everything looks fine here 👍 |
@bpasero Don't use PingFang / Noto Sans / Source Hans on Windows, oe adjust fonts order. If user install those fonts on Windows will cause text blur and difficult to read. |
@arianelu so you say there should be a different order of font-families depending on the OS? or could we do this all in one CSS declaration (preferred). |
On Japanese environment, the new build looks fine on OS X and Windows. |
@arianelu I don't think most Windows users will install PingFang, except for font enthusiasts. In the CSS I suggested, the Source Han Sans family is placed after Windows fonts. |
I think this one is best for zh-cn: "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", "Noto Sana", "Microsoft Yahei UI", "Microsoft YaHei", "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 If linux/mac user installed YaHei, text still beautiful and clear, but other font is not clear/blur on Windows(except hi-dpi) |
@anyong My stylesheets does not contain |
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? |
Cool YOTOV LIMITED[😏] From: ArianeLu notifications@github.com @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 If linux/mac user installed YaHei, text still beautiful and clear, but other font is not clear/blur on Windows(except hi-dpi) — |
@arianelu You have |
@arianelu Your problem is caused by PingFang, not Noto. |
@be5invis So, We just need add Microsoft YaHei UI, WenQuanYi, and move PingFang? Good night , everyone in Asia(UTC+8, 0:36) |
@arianelu @bpasero
is acceptable either. |
@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. |
Pushed the suggestion from #5260 (comment) |
I verified that for the explorer we now use a 'zh-Hans' specific font. |
Electron assigns a serif font,
SimSun
, as the default sans-serif font for zh-CN. This is extremely inconsistent.A workaround may be
The text was updated successfully, but these errors were encountered: