Install Fonts in Linux
There may be different directories on different systems/distributions to install your fonts.
To get the list of font files and paths that your OS uses:
$ fc-list -f '%{file}\n' | sort
If we take Ubuntu as an example, paths will be like:
~/.local/share/fonts/
— fonts for particular user, local user/usr/local/share/fonts/
— fonts for all users, systemwide
Copy your fonts under one of the directories above and reboot the system. If you don’t want to reboot, cache them manually by running:
$ sudo fc-cache -fv
Also many fonts are packaged for Ubuntu available via the “Fonts” category of
the “Ubuntu Software Center”. If you prefer apt-get
, search for packages
starting with “otf-” or “ttf-” and install them.
You can also double-click on the font file (or select “Open with Font Viewer” in the right-click menu). Then click the “Install Font” button.
After installation you can confirm they are installed correctly:
$ fc-list | grep <name-of-font>
You may need to restart some programs, like Visual Studio Code, before they actually show the new fonts. Usually such programs are caching the font list when they start up.
OK, All done!