相关疑难解决方法(0)

如何为 Visual Studio Code 设置字体连字?

我正在使用这两行为我的 VSCode 设置字体连字。

"editor.fontFamily": "'Fira Code'",
"editor.fontLigatures": true,
Run Code Online (Sandbox Code Playgroud)

但它看起来仍然和以前一样。

我试图禁用所有已安装的扩展程序,但没有奏效。

这是我的完整设置:

{
  "workbench.iconTheme": "material-icon-theme",
  "workbench.colorTheme": "Material Theme Darker High Contrast",
  "editor.formatOnSave": true,
  "explorer.confirmDelete": false,
  "editor.suggestSelection": "first",
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "window.zoomLevel": 0,
  "editor.fontSize": 16, //!=
  "editor.fontFamily": "'Fira Code'",
  "editor.fontLigatures": true,
  "explorer.confirmDragAndDrop": false
}
Run Code Online (Sandbox Code Playgroud)

我想要功能齐全的字体连字,如本页所示:我希望它看起来如何。相反,我获得了一些字体的基本文本。

fonts ligature visual-studio-code

10
推荐指数
3
解决办法
2万
查看次数

vscode:使用 Fira Code 的字体连字更新样式集

请参阅2019 年 10 月发行说明 - 样式集

字体功能设置

现在对字体功能有更细粒度的控制。配置时"editor.fontLigatures": true,VS Code 会打开 ligacalt. 但是有些字体有更多的设置,例如 Fira Code 使用的样式集。

我们现在允许明确控制这些字体功能,例如:

"editor.fontFamily": "Fira Code",

"editor.fontLigatures": true,

"[javascript]": {  
   "editor.fontLigatures": "'ss02', 'ss19'",
},
Run Code Online (Sandbox Code Playgroud)

这就是风格集可以做的。(参见https://github.com/tonsky/FiraCode#stylistic-sets。)

Fira Code v2 风格集.

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

  "editor.fontFamily": "Fira Code",  
  "editor.fontLigatures":"'zero', 'ss02', 'ss03', 'ss04', 'ss05', 'calt'",
Run Code Online (Sandbox Code Playgroud)

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

如何在 Visual Studio Code 中使用 Fira Code 版本 2 样式集?

visual-studio-code vscode-settings

4
推荐指数
1
解决办法
2287
查看次数