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

Mac VS Code 里使用中文时字符长度与预期不符 #44

Closed
Eureka-0 opened this issue Sep 12, 2022 · 4 comments
Closed

Mac VS Code 里使用中文时字符长度与预期不符 #44

Eureka-0 opened this issue Sep 12, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Eureka-0
Copy link

image

如图,使用英文时正常在标尺处自动换行,但使用中文时会超出标尺很多才自动换行。

VS Code 中相关设置如下,

image

@subframe7536
Copy link
Owner

感谢反馈,这个我需要研究一下

@subframe7536 subframe7536 added the bug Something isn't working label Sep 12, 2022
@subframe7536
Copy link
Owner

转移到 #43,可以先使用 更纱黑体 mono sc nerd,这个没有问题

@subframe7536
Copy link
Owner

已定位问题,但是没有比较好的解决方法
目前的字符宽度:英文是1200,中文是2400,单位宽度em是2000,这个比例显示的间距是比较好的
这个问题可能是由于计算个数是根据字符本身宽度和em的最小值来的,导致中文字符会多一些,em改成2400就能正确换行了
image
但是这样以来整体的字体大小就会比正常的小,编辑器内可以改字体大小,但是其他地方就不方便调整
也试过改变字形,但是会和 更纱黑体 一样,字母和数字会偏细长,和最初的目的相违背了

@subframe7536
Copy link
Owner

解决方案:#173 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants