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

Monospacing broken by Chinese character #14589

Closed
actboy168 opened this issue Oct 27, 2016 · 7 comments
Closed

Monospacing broken by Chinese character #14589

actboy168 opened this issue Oct 27, 2016 · 7 comments
Assignees
Labels
electron Issues and items related to Electron font-rendering Font rendering issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Milestone

Comments

@actboy168
Copy link

actboy168 commented Oct 27, 2016

  • VSCode Version: Code - Insiders 1.7.0-insider (9d47285, 2016-10-27T06:11:25.272Z)
  • OS Version: Windows_NT ia32 10.0.14393
  • Extensions:

yahei_mono.zip

notepad:
1

vscode:
2

Steps to Reproduce:

1.Setup 'Yahei Mono' font.
2.Set to setting.json

{
    "editor.fontFamily": "Yahei Mono"
}

3.Input

中文汉字  KLMN
中文汉字IJKLMN
中文EFGHIJKLMN
ABCDEFGHIJKLMN
@alexdima
Copy link
Member

alexdima commented Oct 27, 2016

@actboy168 Does it work with "editor.fontFamily": "'Yahei Mono'"

@alexdima alexdima added the info-needed Issue requires more information from poster label Oct 27, 2016
@actboy168
Copy link
Author

3

@alexdima
Copy link
Member

I can reproduce the problem, but I'm sorry the ultimate font rendering is done by Chromium. So, feel free to create an issue against Chromium https://bugs.chromium.org/p/chromium/issues/list

Here for example I am using Inconsolata (http://levien.com/type/myfonts/inconsolata.html)
image

We use 100% the same code to render. When changing fontFamily we simply let Chromium know the desired font family and let it render the text.

@alexdima alexdima added upstream Issue identified as 'upstream' component related (exists outside of VS Code) bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Oct 27, 2016
@alexdima alexdima added this to the Backlog milestone Oct 27, 2016
@abcfy2
Copy link

abcfy2 commented Dec 8, 2016

Same issue here. Chinese fonts does not work with monospace.

Here is my vscode config:

{
    "editor.fontFamily": "'Monaco', 'Source Han Sans'",
    "editor.fontSize": 20,
    "editor.wrappingColumn": 0,
    "editor.wrappingIndent": "indent",
    "editor.formatOnType": true,
    "editor.tabCompletion": true,
    "editor.mouseWheelZoom": true,
    "editor.renderControlCharacters": true,
    "editor.renderIndentGuides": true,
    "files.autoSave": "afterDelay",
    "editor.renderWhitespace": "all",
    "editor.rulers": [80]
}

Chinese fonts are always monospacing.

vim or terminal works very vell.
vim

But vscode doesn't.
vscode

@alexdima
Copy link
Member

@abcfy2 Please create an issue against Chromium if you believe the font you are trying is monospace and Chromium renders it incorrectly https://bugs.chromium.org/p/chromium/issues/list

In the meantime, the Inconsolata font I link to above is monospace and renders consistent widths for CJK characters.

@alexdima alexdima added font-rendering Font rendering issues electron Issues and items related to Electron labels Mar 9, 2017
@alexdima alexdima removed the bug Issue identified by VS Code Team member as probable bug label May 19, 2017
@yume-chan
Copy link
Contributor

xterm.js creates spans for each CJK characters to adjust their width to be equal to two Latin characters, so they look perfect in the Integrated Terminal.

image

Can Code do the same thing?

@alexdima
Copy link
Member

This is an upstream issue (possibly within Chromium), and there are no known workarounds that we could implement on our side. This means there is no possible code change for us to do in VS Code sources to improve things.

To keep the number of issues in our inbox at a manageable level, we’re closing issues that have been on the backlog for a long time but haven’t gained traction or that are not actionable. Thank you for your time and understanding.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron Issues and items related to Electron font-rendering Font rendering issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants