vscode:使用 Fira Code 的字体连字更新样式集 [英] vscode: update to stylistic sets using font ligatures with Fira Code

查看:67
本文介绍了vscode:使用 Fira Code 的字体连字更新样式集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅 .

我已经在使用 Fira Code,所以我想我可以下载字体的第 2 版并将以下几行添加到编辑器设置中.

 "editor.fontFamily": "Fira 代码","editor.fontLigatures":"'zero', 'ss02', 'ss03', 'ss04', 'ss05', 'calt'",

我得到了奇怪的结果:zero 样式可以工作,但以前工作的连字停止工作;其他套装根本不起作用.

如何在 Visual Studio Code 中使用 Fira Code 版本 2 风格集?

解决方案

我注意到如果禁用此设置,样式集会更好,但并不完美:

"editor.letterSpacing": 0.2,

我向 vscode 提交了一个问题,https://github.com/microsoft/vscode/issues/84018 在那里我了解到您应该将 calt 集添加到您的连字设置 ala

"editor.fontLigatures":"'zero', 'ss02', 'ss03', 'ss04', 'ss05', 'calt'",

感谢 alexandrudima.

然后我注意到很多人都遇到了类似的问题,https://github.com/microsoft/vscode/issues/84917

让风格集发挥作用的两个要点:

  1. 在您的操作系统字体管理器中,如果您之前使用过旧版本的 Fira Code,请卸载,然后安装 Fira Code v2.之后可能需要重新启动操作系统和 vscode.

  2. 您几乎肯定需要calt添加到您希望使用的任何新集合的列表,以便让其他集合正常工作.

See October, 2019 Release Notes - stylistic sets.

Font feature settings

There is now more fine grained control over the font features. When configuring "editor.fontLigatures": true, VS Code would turn on liga and calt. But some fonts have more settings, such as stylistic sets used by Fira Code.

We now allow these font features to be explicitly controlled, for example:

"editor.fontFamily": "Fira Code",

"editor.fontLigatures": true,

"[javascript]": {  
   "editor.fontLigatures": "'ss02', 'ss19'",
},

This is what stylistic sets can do. (See https://github.com/tonsky/FiraCode#stylistic-sets.)

.

I was already using Fira Code, so I thought I could download version 2 of the font and add the following lines to the editor settings.

  "editor.fontFamily": "Fira Code",  
  "editor.fontLigatures":"'zero', 'ss02', 'ss03', 'ss04', 'ss05', 'calt'",

I was getting strange results: The zero style would work, but previously working ligatures stopped working; other sets didn't work at all.

How do I get Fira Code version 2 stylistic sets working in Visual Studio Code?

解决方案

I noticed that the stylistic sets would work better, but not perfectly, if I disabled this setting:

"editor.letterSpacing": 0.2,

I filed an issue with vscode, https://github.com/microsoft/vscode/issues/84018 where I learned that you should add the calt set to your ligature settings ala

"editor.fontLigatures":"'zero', 'ss02', 'ss03', 'ss04', 'ss05', 'calt'",

Thanks to alexandrudima.

And then I noticed a number of people were having similar issues, https://github.com/microsoft/vscode/issues/84917

Two important points to get stylistic sets working:

  1. In your OS font manager, uninstall older versions of Fira Code if you were using it before first, and then install Fira Code v2. And restarting the OS and vscode afterwards is probably necessary.

  2. You will almost certainly need to add calt to your list of whatever new sets you wish to use just to get other sets working.

这篇关于vscode:使用 Fira Code 的字体连字更新样式集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆