Firacode: I can't make ligatures work in VSCode.

Created on 11 Sep 2019  Â·  19Comments  Â·  Source: tonsky/FiraCode

It seems that Fira Code font just doesn't work. I think so because it is resemblant to the font, which appears in this issue https://github.com/tonsky/FiraCode/issues/373
The OS is macOS High Sierra.
My settings.json:

{
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "files.autoSave": "afterDelay",
    "explorer.confirmDragAndDrop": false,
    "terminal.integrated.shell.osx": "/bin/bash",
    "editor.fontSize": 16,
    "editor.formatOnPaste": true,
    "editor.formatOnSave": true,
    "workbench.editor.highlightModifiedTabs": true,
    "explorer.sortOrder": "type",
    "editor.cursorStyle": "block",
    "editor.cursorBlinking": "smooth",
    "files.trimFinalNewlines": true,
    "editor.fontFamily": "'Fira Code'",
    "workbench.colorTheme": "One Monokai",
    "editor.fontLigatures": true
}

This line from https://github.com/tonsky/FiraCode/issues/373 apparently makes font work, BUT ligatures still don't work.

"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'",

How can I fix this?

And, please, don't redirect me to https://github.com/tonsky/FiraCode/wiki#troubleshooting, I've already been there.

Most helpful comment

@UkrainianCitizen Maybe you've already found out the way, but just for the sake of other users,

One of solutions: wrapping the "Fira Code" section with additional apostrophes (from https://github.com/tonsky/FiraCode/wiki#installing-font : thanks to @tonsky )
Add below to the JSON file in 'Settings - Launch - Edit it setting.json'
"editor.fontFamily": "'Fira Code'",
"editor.fontLigatures": true,

Careful with quotes and commas.

All 19 comments

Config seems ok. Let’s see some screenshots?

Had a similar problem.
Close all VS Code files and windows and reopen.

@BenRoe I already tried this. Doesn't work.

@tonsky
Знімок екрана 2019-09-12 о 01 15 07
The same piece of code with this line "editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'",
Знімок екрана 2019-09-12 о 01 19 41

@UkrainianCitizen I don't use single quotes in VSCode font settings, and looks like it works fine. Added fat arrow (=>) as an example. This is version 2 from release notes.

image

It does not seem like single quotes make any difference though.

@UkrainianCitizen this is not Fira Code on both screenshot. Have you installed the font? How? Where? Do other apps see it?

@UkrainianCitizen this is not Fira Code on both screenshot. Have you installed the font? How? Where? Do other apps see it?

I am sorry, do I need to install it somehow before using? I thought I should just enable ligatures and define Fira Code as a font in order to use it. At least I didn't see any instructions for doing that. For instance, for Intellij IDEA I've just assigned Fira Code as an editor font and enabled ligatures - and everything there works like a charm.

@UkrainianCitizen I don't use single quotes in VSCode font settings, and looks like it works fine. Added fat arrow (=>) as an example. This is version 2 from release notes.

image

There is no difference for me too, but I just tried that cause it was stated in the troubleshooting guide as one of the solutions.

@tonsky Please, add some hints for installing the font here, because there is NO INFO at all here that you have to install it.

@tonsky Please, add these instructions for installing the font here, because there is NO INFO at all here that you have to install it.

Seriously 🤣🤣🤣 It's like the first thing in wiki... Aaand it's same for all editors, VS Code isn't like the only editor that requires you to install a font, all of them require that.

@tonsky Please, add these instructions for installing the font here, because there is NO INFO at all here that you have to install it.

Seriously 🤣🤣🤣 It's like the first thing in wiki... Aaand it's same for all editors, VS Code isn't like the only editor that requires you to install a font, all of them require that.

Intellij DOES NOT! That's why the original install font section can't apply to all editors, Jetbrains products in particular because you must not install the font for its products on any system! Plus it is quite possible that people can overlook this https://github.com/tonsky/FiraCode/wiki as I did because I was looking just for VSCode, I found the table with editors on the readme, and I ended up here https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions. I did overlook the original page but it would be helpful to have at the beginning of the editor specific page some kind of reminder that you must proceed here only if you have installed the font for this specific editor. Similar smart stuff does Github in its guide for installing ssh in order to prevent from overlooking some prerequisites such as

Checked for existing SSH keys
Generated a new SSH key and added it to the ssh-agent

@UkrainianCitizen makes a good point. I added a link to install to every page. Thanks!

@UkrainianCitizen Maybe you've already found out the way, but just for the sake of other users,

One of solutions: wrapping the "Fira Code" section with additional apostrophes (from https://github.com/tonsky/FiraCode/wiki#installing-font : thanks to @tonsky )
Add below to the JSON file in 'Settings - Launch - Edit it setting.json'
"editor.fontFamily": "'Fira Code'",
"editor.fontLigatures": true,

Careful with quotes and commas.

@brandonwie Thanks, though it seems that if the font installed for IDE which requires such an installation, everything works without additional apostrophes. My Fira Code fonts started working as soon as I installed the fonts.

Had a similar problem.
Close all VS Code files and windows and reopen.

Worked. Thanks

@UkrainianCitizen Maybe you've already found out the way, but just for the sake of other users,

One of solutions: wrapping the "Fira Code" section with additional apostrophes (from https://github.com/tonsky/FiraCode/wiki#installing-font : thanks to @tonsky )
Add below to the JSON file in 'Settings - Launch - Edit it setting.json'
"editor.fontFamily": "'Fira Code'",
"editor.fontLigatures": true,

Careful with quotes and commas.

Just put "editor.fontLigatures": true. It work for me!

I have same problem like yours, Its work for me when:

Install this font on the Mac computer instead of installing it to the user

apple support

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aolko picture aolko  Â·  3Comments

Photonico picture Photonico  Â·  3Comments

ulope picture ulope  Â·  4Comments

blucell picture blucell  Â·  4Comments

hatched picture hatched  Â·  3Comments