Closed ZainIoT closed 2 years ago
The reason why you are seeing that in Terminal one Chinese character is twice as wide as one Latin letter is because Terminal stretches the width of Chinese characters.
终端里面汉字英文宽度2:1的原因是终端把汉字的宽度拉伸了。
Yes, this is because Terminal makes characters fit into cells even if there is font fallback. VS Code does not :)
We do not currently have plans to make a 2:1 cell Chinese glyph set for Cascadia right now, but we will let you know if we do.
Thanks!
hope too.
当前现状
在VSCode中,使用了Cascadia Code字体,但是发现该字体在中英文混合场景下,无法做到严格对其。
VSCode中,关于字体的配置如下:
根据我的配置发现,在没有配置中文字体的情况下,VSCode会自动使用“微软雅黑”进行字体渲染。
但是我在Windows Terminal中字符显示是对其的。
![image](https://user-images.githubusercontent.com/38690228/143022422-81305ee1-48cb-452b-9b12-017bf17d2c5f.png)
建议实现
Cascadia Code字体不支持中文,建议可以实现与特定中文字体宽度为2:1,或支持中文字体渲染且宽度比为2:1。
(machine translation)
Current status
In VSCode, the Cascadia Code font is used, but it is found that the font cannot be strictly aligned in a mixed Chinese and English scenario.
In VSCode, the configuration of fonts is as follows:
According to my configuration, when Chinese fonts are not configured, VSCode will automatically use "Microsoft Yahei" for font rendering.
But my character display in Windows Terminal is correct.
![image](https://user-images.githubusercontent.com/38690228/143022422-81305ee1-48cb-452b-9b12-017bf17d2c5f.png)
Suggested implementation
The Cascadia Code font does not support Chinese. It is recommended to achieve a 2:1 width with a specific Chinese font, or support Chinese font rendering with a width ratio of 2:1.