microsoft / cascadia-code

This is a fun, new monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal.
Other
25.11k stars 796 forks source link

Cascadia Code字体中英文字形宽度比希望为2:1 #603

Closed ZainIoT closed 2 years ago

ZainIoT commented 2 years ago

当前现状

在VSCode中,使用了Cascadia Code字体,但是发现该字体在中英文混合场景下,无法做到严格对其。 image VSCode中,关于字体的配置如下: image 根据我的配置发现,在没有配置中文字体的情况下,VSCode会自动使用“微软雅黑”进行字体渲染。 但是我在Windows Terminal中字符显示是对其的。 image

建议实现

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. image In VSCode, the configuration of fonts is as follows: image 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

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.

Hope to adopt my suggestion

yvvt0379 commented 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的原因是终端把汉字的宽度拉伸了。

DHowett commented 2 years ago

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!

Dynesshely commented 1 year ago

hope too.