nerd-fonts icon indicating copy to clipboard operation
nerd-fonts copied to clipboard

Cannot user Fira Code Nerd Font Retina with VScode

Open trungklam opened this issue 5 years ago • 16 comments

🎯 Subject of the issue

I installed various type of Fira Code Nerd Font Complete but want to specify to use Retina as the font for my VSCode. The below setting didn't work: "editor.fontFamily": "'Fira Code Retina Nerd Font Complete'", or "editor.fontFamily": "FiraCode Nerd Font-Retina'" or "editor.fontFamily": "FiraCode Nerd Font Retina"

The default Fira Code will work with: "editor.fontFamily": "FiraCode-Retina'" To use the regular, I use the below setting and It works: "editor.fontFamily": "FiraCode Nerd Font",

🔧 Your Setup

  • Fira Code Retina Nerd Font Complete
  • VSCode 1.42
  • macOS 10.15.3

★ Optional

trungklam avatar Feb 12 '20 08:02 trungklam

try "FiraCodeNerdFontComplete-Retina" as a font name (cannot visually distinguish it from Regular, but at least vsc does not fail-back to the next font). I found it using:

$ strings ~/Library/Fonts/"Fira Code Retina Nerd Font Complete.otf" | grep Fira | less

triangularcover avatar Feb 20 '20 02:02 triangularcover

try "FiraCodeNerdFontComplete-Retina" as a font name (cannot visually distinguish it from Regular, but at least vsc does not fail-back to the next font). I found it using:

$ strings ~/Library/Fonts/"Fira Code Retina Nerd Font Complete.otf" | grep Fira | less

Thank you for help. I tried but it didn't work for me. "editor.fontFamily": "FiraCodeNerdFontComplete-Retina"

Seems the only way to use retina is only install it without any other version and use the below setting: "editor.fontFamily": "FiraCode Nerd Font Mono"

trungklam avatar Mar 01 '20 14:03 trungklam

@Happin3ss, my issue was not with VSCode specifically but this may help you.

I were checking what name Fira Code had in my system and it was called FiraCode NF, from there I used FiraCode NF Retina and it worked properly! I am unsure whether this may be your issue or not, but I hope I have helped you or anyone else with this issue.

wizardlink avatar May 09 '20 20:05 wizardlink

Just like @wizardlink mentioned, the name of this font is FiraCode NF and FiraCode NF Retina so to use it in VSCode your font setting should be like this:

"editor.fontFamily": "FiraCode NF Retina"

SharakPL avatar May 10 '20 10:05 SharakPL

for me, it worked with FiraCodeNerdFontCompleteM-Retina (M stands for the Mono version)

albanv avatar Jul 16 '20 13:07 albanv

I installed mine using homebrew just today:

  brew tap homebrew/cask-fonts
  brew cask install font-fira-code-nerd-font

I reached the same conclusion as @triangularcover but using a different method. I checked the output of the command mentioned here: https://apple.stackexchange.com/a/243746 Then found the entry for "Fira Code Retina Nerd Font Complete.otf" and used the value "FiraCodeNerdFontComplete-Retina" found below "Typefaces". I'm not sure why for some the font is called FiraCode NF, maybe an older version?

Example of output:

      Kind: OpenType
      Valid: Yes
      Enabled: Yes
      Location: /Users/sauls/Library/Fonts/Fira Code Retina Nerd Font Complete.otf
      Typefaces:
        FiraCodeNerdFontComplete-Retina:
          Full Name: Fira Code Retina Nerd Font Complete
          Family: FiraCode Nerd Font
          Style: Retina
          Version: Version 2.000;PS 002.000;hotconv 1.0.88;makeotf.lib2.5.64775
          Vendor: Carrois Corporate, Edenspiekermann AG, Nikita Prokopov
          Unique Name: 2.000;CTDB;FiraCode-Retina
          Designer: Carrois Corporate, Edenspiekermann AG, Nikita Prokopov
          Copyright: Copyright 2012-2015 The Fira Code Project Authors (https://github.com/tonsky/FiraCode)
          Trademark: Fira Mono is a trademark of The Mozilla Corporation.
          Outline: Yes
          Valid: Yes
          Enabled: Yes
          Duplicate: No
          Copy Protected: No
          Embeddable: Yes

saulimus avatar Jul 28 '20 13:07 saulimus

Linux users can change the font family with fontforge as a workaround.

Goto Element>Font Info. In the new window, change PS Names>Family Name and TTF Names>Preferred Family Then File>Generate Font>Generate. Select Font Type(I used TrueType). Ignore warnings, if any.

After placing them in the appropriate folder(like ~/.local/share/fonts/), rebuild font cache with fc-cache -f ~/.local/share/fonts/.

You can check if everything went right by fc-list | grep -i "fira" | column -t -s":" (Displays - font family stype)

# Sample Output
/home/h2g2/.local/share/fonts/Fira Code Bold Nerd Font Complete Mono.ttf      FiraCode Nerd Font Mono         style=Bold
/home/h2g2/.local/share/fonts/Fira Code Retina Nerd Font Complete Mono.ttf    FiraCode Nerd Font Mono Retina  style=Retina,Regular
/home/h2g2/.local/share/fonts/Fira Code Medium Nerd Font Complete Mono.ttf    FiraCode Nerd Font Mono Medium  style=Medium,Regular
/home/h2g2/.local/share/fonts/Fira Code Regular Nerd Font Complete Mono.ttf   FiraCode Nerd Font Mono         style=Regular
/home/h2g2/.local/share/fonts/Fira Code Light Nerd Font Complete Mono.ttf     FiraCode Nerd Font Mono Light   style=Light,Regular

Now you can use "editor.fontFamily": "FiraCode Nerd Font Mono Retina" in vscode.

AvyChanna avatar Mar 02 '21 08:03 AvyChanna

On macOS:

Used $ system_profiler SPFontsDataType >> fonts.txt to generate a text file containing information on all the fonts in my computer.

Search for which Family name the font belongs to:

      Typefaces:
        FiraCodeNerdFontCompleteM-Retina:
          Full Name: Fira Code Retina Nerd Font Complete Mono
          Family: FiraCode Nerd Font Mono
          Style: Retina

Added the following line to settings.json: "terminal.integrated.fontFamily": "FiraCode Nerd Font Mono"

Keep in mind that VSCode terminal only accepts monocode fonts

felix-tran avatar Jul 22 '21 22:07 felix-tran

For what its worth - "terminal.integrated.fontFamily": "HackNerdFontComplete-Regular", ended up working for me.

shelbyspeegle avatar Aug 19 '21 19:08 shelbyspeegle

Download Nerd Font, but only install FiraCode Nerd Font Retina Complete. Then go to the font settings of your windows 10 and see what is the display name of the font. Then in the settings.json file "editor.fontFamily": your font name with retina For Me: "editor.fontFamily": "FiraCode Nerd Font Retina"

pattanaiknitish123 avatar Aug 21 '21 14:08 pattanaiknitish123

for me, it worked with FiraCodeNerdFontCompleteM-Retina (M stands for the Mono version)

Thanks!It' work for me !

FHXISDOG avatar Aug 30 '21 16:08 FHXISDOG

Download Nerd Font, but only install FiraCode Nerd Font Retina Complete. Then go to the font settings of your windows 10 and see what is the display name of the font. Then in the settings.json file "editor.fontFamily": your font name with retina For Me: "editor.fontFamily": "FiraCode Nerd Font Retina"

Worked for me :) Thank You :+1:

rakshit087 avatar Sep 19 '21 14:09 rakshit087

I'm seeing an issue with FiraCode NF Retina not being recognized as a distinct font.

After installing FiraCode NF (all faces), I see this:

This suggests its part of the FiraCode NF Family image

But when I go into the fonts folder, I don't see Retina as a distinct font, nor do I see it as part of the family image

Compare this with the standard (non Nerd Font) Fira Code: image

mtsitzer avatar Dec 30 '21 08:12 mtsitzer

I've used 'FiraCode Nerd Font', it works for me in ubuntu

KavehKarami avatar Apr 06 '22 19:04 KavehKarami

Would be fixed by #717

Finii avatar Apr 06 '22 20:04 Finii

You can check the font name in Windows Terminal and use the same name in VS Code. image

To select the nerd fonts, make sure the "Show all fonts" option is enabled. image

mdhvg avatar Jul 07 '22 11:07 mdhvg

@saulimus FiraCode NF is the Windows Compatible name.

Anyhow, the naming is broken for applications that use the old-style sets-of-4 with Family and Subfamily. Newer applications that use TypographicFamily etc are fine already:

image

You see hat the left half names (old system) are all equal :-( This will be fixed with v3.0.0 and --makegroups.

Finii avatar Feb 04 '23 15:02 Finii

There's a post with instructions to enable either Fira Code or Fira Code Retina in vscode: https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions

eslavidaloca avatar Jun 06 '23 19:06 eslavidaloca

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.

github-actions[bot] avatar Dec 11 '23 00:12 github-actions[bot]