33

I am setting up fonts ligatures for my VSCode using these two lines.

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

But it still looks the same as before.

I have tried to disable all of my installed extensions but it didn't work.

Here is my full settings:

{
  "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
}

I want fully functional font ligatures as on this page: How i want it to look. Instead I am getting basic text with some font.

9
  • 2
    Try without the inner quotes: "Fira Code", (assuming you installed the font properly).
    – Mark
    May 19, 2019 at 16:55
  • "It doesn't work" is an opinion, not a problem, and certainly not the kind of detail that others can use to help you figure out what's wrong, so: what did you expect it to do, and what justifies having that expectation? What did you do to test it, what did you expect that to do, and why, and what did it do instead? May 19, 2019 at 16:56
  • 1
    @Mark i have tryed your opinion "Fira Code", but it didnt help. May 19, 2019 at 17:14
  • 1
    @Mike'Pomax'Kamermans Do i have it right now? I am frst time here so i am realy glad for every help. May 19, 2019 at 17:20
  • 1
    Okay it works now. I realized all I needed to do is to restart the computer...I am using a macOS.
    – Aero Wang
    Mar 28, 2020 at 17:40

8 Answers 8

74

Step #1: Install Fira Code.

Step #2: Set the font in VSCode settings:

"editor.fontFamily": "Fira Code, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,

Step #3: Restart/reload VSCode.

That's about it.

1
  • 1
    good one. Not sure why others are not telling that you have to install Fira Code font first. Jan 22 at 9:08
6

Since VS Code 1.40, editor.fontLigatrues supports string settings, that is useful for fonts that support different stylistic sets:

i.e.:

  • "editor.fontLigatures": "'ss09', 'zero', 'onum'",
  • "editor.fontLigatures": "'ss01'",

You can read more about feature tags here (but the support depends on the font in question):

https://learn.microsoft.com/en-us/typography/opentype/spec/featuretags

5

It doesn't seem you didn't have the Fira font installed in your PC. Please follow this step if you are using MacOS.

Open terminal and run these commands.

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

And try to restart VsCode.

Or if you are on other OS (Windows or Linux) follow this step. https://github.com/tonsky/FiraCode/wiki/Installing

Hopefully, this might be helpful.

2
  • 2
    There is no need to use or install brew. Just get the TTF github.com/tonsky/FiraCode/blob/master/distr/ttf/…
    – Ariel M.
    Jul 31, 2020 at 3:41
  • I too had an issue to first get this working, had to restart by exiting, at least for the font family. FiraCode font is pretty nice and was able to get font ligatures working too (no need to restart for this). Think the issue other might run into , VS Code seems to have a number of places where to specify the font uses. What worked for me was editing my settings file directly: editor.fontFamily": "'fira Code', fall backs..., ... "editor.fontLigatures": true, All good now, hope it helps :)
    – Dano
    Jan 27, 2022 at 1:39
3

For those with a different version of VS Code you can try to press key combination of control and comma ( Ctrl+, ) to open your settings tab and then after search for font ligatures

Search Results

After this click on Edit in settings.json.

Then set editor.fontLigatures=true.

Final look

After completing this step then you'll be good to go.

2

I solved my problem put Fira Code without ""

2

This is still not fixed in VS Code. But looks like it's close. After 2 years the VS Code Terminal will finally support "Cascadia Code" and other fonts with programming ligatures.

Edit: Checkout monaspace.githubnext.com

1

If you are using a macOS sometimes you will need to restart the computer before the ligatures for Visual Studio Code to take effect.

0

Install FiraCode font-family for Mac 'Computer' but not 'User'

How to install and remove fonts on your Mac--Apple support

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.