-
-
Save muammar/a5ffb635eb7f532346a8e777b847f8a7 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
## cf from http://programster.blogspot.com/2014/05/ubuntu-14-desktop-install-fira-sans-and.html | |
cd /tmp | |
# install unzip just in case the user doesn't already have it. | |
if [[ `uname` = Linux ]]; then | |
sudo apt-get install unzip -y | |
wget "http://www.carrois.com/downloads/fira_4_1/FiraFonts4106.zip" | |
wget "http://www.carrois.com/downloads/fira_mono_3_2/FiraMonoFonts3206.zip" | |
unzip FiraSans4106.zip | |
unzip FiraMono3206.zip | |
sudo mkdir -p /usr/share/fonts/truetype/FiraSans | |
sudo mkdir -p /usr/share/fonts/opentype/FiraSans | |
sudo cp Fira*/WEB/*.ttf /usr/share/fonts/truetype/FiraSans/ | |
sudo cp Fira*/OTF/Fira* /usr/share/fonts/opentype/FiraSans/ | |
sudo fc-cache -fv | |
else | |
wget https://github.com/mozilla/Fira/archive/4.202.zip | |
unzip 4.202.zip | |
font_dir="$HOME/Library/Fonts" | |
mkdir -p $font_dir | |
cp Fira-4.202/otf/* $font_dir/ | |
fi |
brew cask install \ font-fira-code \ font-fira-mono \ font-fira-mono-for-powerline \ font-fira-sans
Perfect! I'll also mention that if you get an error like
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
...you should run:
xcode-select --install
404
404 Not Found
The brew method posted by @naeramarth7 worked well for me on OS X. Thx
Using
brew cask
, this would be:brew tap caskroom/fonts brew cask install \ font-fira-code \ font-fira-mono \ font-fira-mono-for-powerline \ font-fira-sans
caskroom/fonts was moved. Tap homebrew/cask-fonts instead.
brew tap homebrew/cask-fonts
brew cask install \
font-fira-code \
font-fira-mono \
font-fira-mono-for-powerline \
font-fira-sans
Looks like the brew has issues
$brew tap caskroom/fonts
Error: caskroom/fonts was moved. Tap homebrew/cask-fonts instead.
$brew tap caskroom/cask-fonts
Error: caskroom/cask-fonts was moved. Tap homebrew/cask-cask-fonts instead.
$brew tap caskroom/cask-cask-fonts
Error: caskroom/cask-cask-fonts was moved. Tap homebrew/cask-cask-cask-fonts instead.
$brew tap caskroom/cask-cask-cask-fonts
Error: caskroom/cask-cask-cask-fonts was moved. Tap homebrew/cask-cask-cask-cask-fonts instead.
$brew tap caskroom/cask-cask-cask-cask-fonts
Error: caskroom/cask-cask-cask-cask-fonts was moved. Tap homebrew/cask-cask-cask-cask-cask-fonts instead.
Oh come on Brew are you kidding me !!!
@gravityrahul Try brew tap homebrew/cask-fonts
Using
brew cask
, this would be:brew tap caskroom/fonts brew cask install \ font-fira-code \ font-fira-mono \ font-fira-mono-for-powerline \ font-fira-sans
As of Dec 31, 2019 the new Fira Code font cask is:
brew tap homebrew/cask-fonts
Not officially supported, might install outdated version
brew tap caskroom/fonts
brew cask install font-fira-code
Very useful script! Thank you so much!
As of Jan 27, 2021 brew cask install
is disabled, use brew install --cask
instead.
brew tap homebrew/cask-fonts
brew install --cask \
font-fira-code \
font-fira-mono \
font-fira-mono-for-powerline \
font-fira-sans
Works like a charm! Thanks.
nice one.. works fine
Thanks @latavin243
Cask 'font-fira-mono-for-powerline' depends on brew install subversion
done first.
How do I install font-fira-code on Linux currently?
When I try the currently provided commands:
brew tap homebrew/cask-fonts
brew install --cask \
font-fira-code \
font-fira-mono \
font-fira-mono-for-powerline \
font-fira-sans
I receive the following error:
Error: Invalid `--cask` usage: Casks do not work on Linux
Any workaround on Linux?
On macOS, it worked like a charm for me.
for linux :)
mkdir -p ~/.fonts/
wget https://github.com/tonsky/FiraCode/raw/master/FiraCode-Regular.otf -O ~/.fonts/FiraCode-Regular.otf
fc-cache -v
more info here https://github.com/tonsky/FiraCode/wiki/Linux-instructions#installing-with-a-package-manager
@naeramarth7 Thanks!