Manually install fonts in Ubuntu

In this article, we cover how to manually install fonts in Ubuntu. Not all fonts are available through standard Ubuntu repository. So, such fonts which aren’t available through the repository can be obtained from the web. Besides, do check the License and other terms before using a font.

The fonts directory list is provided in the configuration file –

/etc/fonts/fonts.conf

Usually, these are the directories where we store/install fonts –

usr/share/fonts
/usr/local/share/fonts
~/.fonts

We would utilize here ~/.fonts directory to install fonts. As it wouldn’t require any superuser privileges. But, then font usage will be restricted to a specific user.

Manually install fonts in Ubuntu

Although it may not be right to use the word install here. But, the impact of what we do here is pretty similar. Just that, we don’t use any package files to get the work done. So, to start with either you may have a compressed font package – which could end with .zip or font file ending with extensions .ttf and .otf.

Ignore Section I and continue from Section II straightaway, if you already have font files ending with extensions .ttf and .otf.

Section I. If we have compressed font package (let’s say – xyz.zip) then we need to extract it first, issue the following in terminal –

unzip xyz.zip

If you don’t have unzip command-line utility. Then, use any other tool which you could be comfortable with. Apart from that, you can also install unzip package through –

sudo apt update
sudo apt install unzip

For more info on unzip. Note: Above installation command would require you to have superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator for assistance.

Once the contents of compressed file are extracted – we get font files ending with extension .ttf or .otf.

Section II. Now, move these font files – .ttf and .otf to the desired directory which in our case is ~/.fonts

Use the following to move .ttf files to ~/.fonts

mkdir ~/.fonts/xyz
mv *.ttf ~/.fonts

or, to move .otf files –

mkdir ~/.fonts/xyz
mv *.otf ~/.fonts

It is worth mentioning here that, we chose to make a directory in the name of the font we install, i.e. xyz (in this case). Reason: If we choose to install multiple fonts and put them under the same directory then, it would be cumbersome for us identify the right font files. So, we prefer to use different directories for different fonts.

That is pretty much we have to do.

In conclusion, we have covered how to manually install fonts in Ubuntu here.

Similar Posts