I have this beautiful mono font https://github.com/tonsky/FiraCode that I'd like to use in Visual Studio Code in Ubuntu.
I downloaded the font files (.ttf), I understood that to make a font systemwide available I have to copy it to /usr/share/fonts
, so I sudo-copied those files to /usr/share/fonts/truetype/fira-code
I noticed the premissions after the copy were 750, so I chmoded to 755
Now I go to the Visual Studio Code preferences and tell it I will use "Fira Code", and does nothing. If I change it to "DejaVu Sans Mono" for example, it will use that font.
Doing this, I don't see the fonts in LibreOffice, either.
After this fail, I created a .fonts
directory on my home and copied the .ttf files, same result. (I followed the instructons here: https://itsfoss.com/install-fonts-ubuntu-1404-1410/)
Copying the fonts here, I see them in LibreOffice, but I can't use them in Visual Studio Code
So looks like there most be some kind of "font registry" sort to speak, how do you correctly install font files in Ubuntu?
Best Answer
To set this beautiful fonts up use the following steps
Download the fonts from here
Unzip and in the
ttf
folder double click each file and selectinstall
from the dialogue box that appearsSetup VSCode:
File -> Preferences -> Settings
{}
and theuser settings
(settings.json) will open upAdd the following lines:
font family entry
which I can switch back to by reversing the process.To change the font weight add any of the following lines but not all
Restart and enjoy.
My sample user settings.json