1. Make sure that the `universe` (for Ubuntu) or `contrib` (for Debian) repository is enabled (see https://askubuntu.com/questions/148638/how-do-i-enable-the-universe-repository or https://wiki.debian.org/SourcesList#Component)
2. Install `fonts-firacode` package either by executing `sudo apt install fonts-firacode` in the terminal or via GUI tool (like “Software Center”)
With most desktop-oriented distributions, double-clicking each font file in the ttf folder and selecting “Install font” should be enough. If it isn’t, create and run `download_and_install.sh` script:
More details: https://github.com/tonsky/FiraCode/issues/4
FreeBSD
-------
Using pkg(8):
pkg install firacode
OR
Using ports:
cd /usr/ports/x11-fonts/firacode && make install clean
Enabling ligatures
==================
Atom
----
To change your font to Fira Code, open Atom's preferences (`cmd + ,` on a Mac, `ctrl + ,` on PC), make sure the "Settings" tab is selected, or the "Editor" in Atom 1.10+, and scroll down to "Editor Settings". In the "Font Family" field, enter `Fira Code`.
If you wish to specify a font weight, for example, Light, use `Fira Code Light` as a font name (Windows) or `FiraCode-Light` (macOS).
Ligatures are enabled by default in Atom 1.9 and above.
VS Code
-------
To open the settings editor, first from the File menu choose Preferences, Settings or use keyboard shortcut `Ctrl + ,` (Windows) or `Cmd + ,` (macOS).
To enable FiraCode in the settings editor, under "Commonly Used", expand the "Text Editor" settings and then click on "Font". In the "Font Family" input box type `Fira Code`, replacing any content. Tick the check box "Enables/Disables font ligatures" under "Font Ligatures" to enable the special ligatures.
If you wish to specify a font weight, for example, Light, use `Fira Code Light` as a font name (Windows) or `FiraCode-Light` (macOS).
IntelliJ products
-----------------
1. Enable in Settings → Editor → Font → Enable Font Ligatures
2. Select `Fira Code` as "Primary font" under Settings → Editor → Font
Additionally, if a Color Scheme is selected:
3. Enable in Settings → Editor → Color Scheme → Color Scheme Font → Enable Font Ligatures
4. Select Fira Code as "Primary font" under Settings → Editor → Color Scheme → Color Scheme Font
(set-fontset-font t '(#Xe100 . #Xe16f) "Fira Code Symbol"))
(provide 'fira-code-mode)
Alternative instructions: https://github.com/Profpatsch/blog/blob/master/posts/ligature-emulation-in-emacs/post.md#appendix-b-update-1-firacode-integration
3. Using composition char table
Thanks to https://github.com/seanfarley for putting this together; extended by https://github.com/jrblevin.
**Note!** If you get `error in process filter: Attempt to shape unibyte text`, check out https://github.com/tonsky/FiraCode/issues/42. Emacs Cider users may avoid this issue by commenting the following line from the above config:
;; (46 . ".\\(?:\\(?:\\.[.<]\\)\\|[.=-]\\)")
Char `45` is also known to have issues in macOS Mojave.
If you are having problems with helm you can disable ligatures in helm:
(add-hook 'helm-major-mode-hook
(lambda ()
(setq auto-composition-mode nil)))
4. Using font-lock keywords
If none of the above worked, you can try this method.
This method requires you to install the Fira Code Symbol font, made by https://github.com/siegebell:
-webkit-font-feature-settings: "liga" on, "calt" on;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: 'Fira Code';
}
4. Back in Preferences tab, click on User Settings, then click on Code Editor (Ace)
5. In Font Family field, enter Fira Code
6. Optionally, repeat step 5 for Preferences > User Settings > Terminal, if you want Fira Code font in C9 terminal.
MacVim
------
Add this to ~/.gvimrc:
set macligatures
set guifont=Fira\ Code:h12
MacVim supports ligatures starting from version 7.4.
RStudio
-------
In RStudio:
1. Go to Tools > Global Options > Appearance
2. Select "Fira Code" as Editor Font. In older versions of RStudio, check "Use Ligatures".
3. Hit "OK" and enjoy
Sublime Text
------------
Preferences --> Settings
Add before "ignored_packages":
"font_face": "Fira Code",
"font_options": ["subpixel_antialias"],
If you want enable antialias, add in font_options: "gray_antialias"
Visual Studio
-------------
1. Launch Visual Studio (2015 or later).
2. Launch the Options dialog by opening the "Tools" menu and selecting "Options".
3. In the Options dialog, under the "Environment" category, you'll find "Fonts and Colors". Click on that. You'll see a combo-box on the right hand side of the dialog labelled "Font". Select "Fira Code" from that combo-box.
4. Click "OK" to dismiss.
5. Restart Visual Studio.
Now, most FiraCode ligatures will work. A notable exception is the hyphen-based ligatures (e.g. the C++ dereference '->'). See https://github.com/tonsky/FiraCode/issues/422 for details.
Troubleshooting
===============
See https://github.com/tonsky/FiraCode/wiki/Troubleshooting