简体   繁体   English

尽管在 Windows 的 VS Code 中安装了字体并激活了连字,但仍无法显示 FiraCode

[英]Can't get FiraCode to show despite the font installed and ligatures activated in VS Code in Windows

In my settings I have:在我的设置中,我有:

"editor.fontLigatures": true, “editor.fontLigatures”:是的,
"editor.fontFamily": "Fira Code, Comic Sans MS, Tahoma, Consolas", "editor.fontFamily": "Fira Code, Comic Sans MS, Tahoma, Consolas",

and I've tried (according to this ) different combinations of apostrophes, spaces and capitalization.我已经尝试过(根据这个)撇号、空格和大写字母的不同组合。 No matter what I do, I get Comic Sans to pop (or some plain, weird junk if I only specify Fira Code with no secondary font.无论我做什么,我都会让 Comic Sans 流行起来(或者如果我只指定 Fira Code 而不指定辅助字体,那么会是一些普通的、奇怪的垃圾。

I verified that I've installed all the fonts from their GitHub and I can see the fonts in the list in my text processor (of course they do look as supposed to when typed with said font too).我确认我已经从他们的 GitHub安装了所有字体,并且我可以在我的文本处理器的列表中看到这些字体(当然,当使用所述字体键入时它们看起来也应该如此)。 I also tried sweeten up the process using choco install FiraCode , reported as successful.我还尝试使用choco install FiraCode使过程变甜,报告为成功。

The ligatures are turned set to true, as shown above.连字设置为 true,如上所示。 The latest version of VSC is installed and the system is rebooted to the borders of ridiculity.安装了最新版本的 VSC,系统重新启动到可笑的边缘。 I have almost no extensions and those few I had, I deactivated.我几乎没有扩展程序,而我拥有的那些很少,我已停用。

What else can I do to troubleshoot the issue?我还能做些什么来解决问题?

In my case I downloaded Fira Code v2 without first uninstalling v1.就我而言,我下载了 Fira Code v2,而没有先卸载 v1。 And I don't think it will ever work with both versions installed.而且我认为它不会同时安装两个版本。 So in Windows, go to your Settings/Font Settings and search for Fira Code - there will be an uninstall button there.因此,在 Windows 中,转到您的设置/字体设置并搜索 Fira 代码 - 那里会有一个卸载按钮。

After installing v2, (install instructions https://github.com/tonsky/FiraCode/wiki/Installing ) the variants you installed like Light , Regular , Medium , Bold and Retina` for example will be listed along with the version number.安装 v2 后,(安装说明https://github.com/tonsky/FiraCode/wiki/Installing )您安装的变体,例如LightRegular 、 Medium , Bold and Retina` 将与版本号一起列出。

Then I would definitely reboot your computer before trying to get Fira Code and font ligatures working in vscode.然后我肯定会在尝试让 Fira Code 和字体连字在 vscode 中工作之前重新启动你的计算机。 Also see vscode: update to stylistic sets using font ligatures with Fira Code for some gothchas with ligatures.另请参阅vscode: update to stylistic sets using font ligatures with Fira Code for some gothchas with ligatures。

Then after changing the font face in vscode I would reload vscode too.然后在 vscode 中更改字体后,我也会重新加载 vscode。 These settings work for me:这些设置对我有用:

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

if you want the other stylistic sets that Fira Code offers.如果您想要 Fira Code 提供的其他风格集。 The calt on the end was necessary to make most of the rest work for some reason.出于某种原因,最后的calt是使其余大部分工作所必需的。 See the SO question link just above for more on that.有关更多信息,请参见上面的 SO 问题链接。

hi use this settings just select fira code font only您好,使用此设置只需选择 fira 代码字体

"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,

and download this font https://github.com/tonsky/FiraCode/blob/master/distr/otf/FiraCode-Bold.otf并下载此字体https://github.com/tonsky/FiraCode/blob/master/distr/otf/FiraCode-Bold.otf

我遇到了同样的问题,我没有使用Fira Code ,而是使用了fira code ,然后我重新启动了 VS Code,然后我在编辑器中得到了预期的字体。

I used this我用这个

"editor.fontLigatures": true, “editor.fontLigatures”:是的,
"editor.fontFamily": "'Cascadia Code'" "editor.fontFamily": "'Cascadia 代码'"

worked for me don't know why为我工作不知道为什么

我遇到了同样的问题,安装字体后重新启动系统(Windows 10)修复了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM