Firacode: Add install instruction

Created on 8 Jan 2015  Â·  27Comments  Â·  Source: tonsky/FiraCode

At least for Mac, Ubuntu and Fedora

Most helpful comment

Linux way:

mkdir -p ~/.fonts/
wget https://github.com/tonsky/FiraCode/raw/master/FiraCode-Regular.otf -O ~/.fonts/FiraCode-Regular.otf
fc-cache -v

All 27 comments

/cc @tonsky

Linux way:

mkdir -p ~/.fonts/
wget https://github.com/tonsky/FiraCode/raw/master/FiraCode-Regular.otf -O ~/.fonts/FiraCode-Regular.otf
fc-cache -v

Well, for Mac you just double-click it. Didn’t know using fonts is non-trivial on Linux

On Ubuntu you just double click and the gnome font viewer pops up. It has an install button.

Closing this as it is super trivial

Depending on the version of Ubuntu this might not be completely trivial, for example on xubuntu @ai instructions are needed (double click not enough).

I have issues _updating_ the font in Ubuntu. Ubuntu thinks Fira Code is already installed and doesn't care about the version. I have to replace the font files in ~/.local/share/fonts/ (or remove them, and install the new files by clicking on them).

@engelfrost fc-cache -fv, or fc-cache -rv?

I’m not sure how I can put that together into something useful. Looks like
everyone on linux has different experience and their own set of hacks that
work for them and their setup but for other people. Ideas?

On Mon, Jan 11, 2016 at 5:45 PM vyp [email protected] wrote:

@engelfrost https://github.com/engelfrost fc-cache -fv, or fc-cache -rv?

—
Reply to this email directly or view it on GitHub
https://github.com/tonsky/FiraCode/issues/4#issuecomment-170516892.

@tonsky put what together? Anyway, honestly, installing fonts is very easy. Just place them in .fonts and run fc-cache -f.

Actually, the more correct place is ~/.local/share/fonts, or more technically $XDG_DATA_HOME/fonts.

There is a lot of variety indeed, but I suspect that

  • mkdir ~/.fonts
  • Put your fonts in that directory
  • fc-cache -f

Will cover the vast majority of cases. There might be alternatives, but this is the least common denominator

Added a page to the wiki

@tonsky Apparently you can also install Fira Code via https://github.com/caskroom/homebrew-fonts on mac. Is this something you keep up to date, or is there some anonymous hero that did that?

command to install appears to be brew cask install font-fira-code

No, it wasn’t me

On Thu, Feb 4, 2016 at 3:17 AM Andrew Holloway [email protected]
wrote:

@tonsky https://github.com/tonsky Apparently you can also install Fira
Code via https://github.com/caskroom/homebrew-fonts on mac. Is this
something you keep up to date, or is there some anonymous hero that did
that?

command to install appears to be brew cask install font-fira-code

—
Reply to this email directly or view it on GitHub
https://github.com/tonsky/FiraCode/issues/4#issuecomment-179473151.

@tonsky Hi, just saw this comment thread about installing your really cool font with the ligatures when I was hunting for installation on Linux instructions because I wanted to use it w/ F# in VS Code, and see how well it would also work in Sublime (which I use for Haskell) as well. I'm on a Debian 8 desktop (my primary dev machine) and I would like to say that installing fonts is not trivial.

What works for Ubuntu does not always work for Debian. So what I will do is attempt the install on Debian, and then also on my second desktop which has the Arch Linux OS. If I am able to succeed in installing the Fira Code font in both of those Linux distros, I would like to contribute a "how to" for others' benefit either on your repo or on your wiki page for Fira Code, including what to do when you run into an installation and run problem.

One way to do it on Debian 8. As root:

apt install git # skip this if you have git installed
cd /usr/share/fonts # system wide fonts
git clone --depth 1 https://github.com/tonsky/FiraCode.git # get only the last commit of the master branch 
cd FiraCode
git filter-branch --subdirectory-filter distr # This keeps only the contents of the distr/ directory and moves its contents one level up.
fc-cache -f -v

By the way, starting from September, one can just install fonts-firacode package from the Stretch (current testing) contrib repo. (And even if you're on stable, it doesn't have any dependencies.) It will also be available in Ubuntu 17.04 (Zesty.)
So yeah, no more manual installs! 🎉

the latest comment should be placed more prominently in the README 👍

@tonsky
Now that both Stretch and Zesty are released, would it be ok if I add instructions for them to the _“Installing font”_ section? It's trivial, just apt install fonts-firacode, but you have to remember to enable contrib/universe repositories first; plus currently wiki seem to suggest that there's only manual installation for Linux users which isn't true anymore.


Something like this:

-Linux: 
+Linux — Debian 9 / Ubuntu 17.04 or newer:
+
+- make sure that `contrib` (for Debian) or `universe` (Ubuntu) repository is enabled (enabling `non-free` / `multiverse` isn't required)
+- install `fonts-firacode` package, with either `apt` (`sudo apt install fonts-firacode`) or other package manager
+
+Linux — Manual installation:
+
 - in the ttf folder, double-click each font file, click “Install font”

Would you also want to add AUR instructions for Arch? It might be better to have a list of distributions where it’s available through usual package management channels which could look like:

  • Debian (in the contrib repository)
  • Ubuntu (in the universe repository)
  • Arch (available in the AUR)

I opened a separate issue #456, so not to bother all subscribers to this one. Let's continue there.

mkdir -p ~/.fonts/
wget https://github.com/tonsky/FiraCode/raw/master/distr/otf/FiraCode-Regular.otf -O ~/.fonts/FiraCode-Regular.otf
fc-cache -v

Correction:

mkdir -p ~/.fonts
wget https://github.com/tonsky/FiraCode/raw/master/distr/otf/FiraCode-Regular.otf -O ~/.fonts/FiraCode-Regular.otf
fc-cache -v

Note raw in the URL, to get the actual OTF file.

no logro agregar fira code en Ubuntu 18.04 lts en el editor de atom .. alguien puede ayudarme porvafor?

@maxaqquepucho did https://github.com/tonsky/FiraCode/wiki/Linux-instructions#installing-with-a-package-manager worked for you?

@tonsky On Ubuntu 14.04 doesn't work (can't find package even if 'universe' repo is enabled).
@dhruvdutt works for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pedrowebcomum picture pedrowebcomum  Â·  4Comments

pamu picture pamu  Â·  3Comments

mlajtos picture mlajtos  Â·  4Comments

Igorgro picture Igorgro  Â·  3Comments

Gang-Yang picture Gang-Yang  Â·  3Comments