我正在使用这两行为我的 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)
我想要功能齐全的字体连字,如本页所示:我希望它看起来如何。相反,我获得了一些字体的基本文本。
字体功能设置
现在对字体功能有更细粒度的控制。配置时
"editor.fontLigatures": true,VS Code 会打开liga和calt. 但是有些字体有更多的设置,例如 Fira Code 使用的样式集。我们现在允许明确控制这些字体功能,例如:
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,Run Code Online (Sandbox Code Playgroud)"[javascript]": { "editor.fontLigatures": "'ss02', 'ss19'", },
这就是风格集可以做的。(参见https://github.com/tonsky/FiraCode#stylistic-sets。)
我已经在使用 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 样式集?