How To Install Fonts In GNU / Linux

Long ago I read an entry in which it was indicated how, by means of a script, to install the Windows fonts in Fedora. For some it worked, for others it didn't, based on their feedback.

However, there is a manual way to do it, in addition to being an option in which the average user can understand the full operation of the installation.

This mode applies to any Linux distribution and to any program that uses system fonts.

Install fonts graphically

On the internet there are many container sites for fonts with different types of licenses. Among the free ones we find dafont.com, FontSpace, Font Squirrel, among others.

The first step to follow is to download the font of our choice. I chose, as a test, Season of the Witch. I select the download destination in the Downloads directory. We can see that the compressed file is in our download directory.

We extract the container by right clicking and «Exit here».

The decompression procedure may vary depending on the desktop environment.

Once unzipped we will see that the file has the ending ttf. This termination indicates that we are facing a file of typographic fonts.

Sources1

This file will have to be copied to the / usr / share / fonts directory, but there is a "small" detail: we must have root permission to access it.

Therefore we enter a terminal, we log in as root and we open the file explorer of our preference or that comes with our desktop environment. Since at the moment I use Gnome I will have to do it with Nautilus.

su nautilus

Once we have the file explorer as root, we copy the font file to the directory / usr / share / fonts. To give a greater order to the destination directory, we can create a directory with the name of the source and inside it paste the file.

Sources 2

One last step is still missing: give the file the corresponding permissions. Right click, «Properties». We go to the "Permissions" tab and in "Group" and "Others" select the "Read only" option.

Sources 3

Ready. If we open LibreOffice we can see that the font is already installed.

Sources 4

Install fonts from terminal

The installation of the fonts through the terminal is as simple as it is graphically, with the advantage that you do everything from the same window. We can do this directly.

First we go to the directory where the font was downloaded, «Downloads».

cd Descargas

Unzip the file.

unzip season_of_the_witch

Once uncompressed, we log in as root

su

We create a folder with the name of the source in the destination directory (if the name has separate words it is put in quotes. Otherwise the terminal interprets each word as different directories)

mkdir /usr/share/fonts/"Season_of_the_witch"

We copy the file to the destination directory.

cp Season_of_the_Witch.ttf /usr/share/fonts/"Seasons_of_the_witch"

We are in the directory

cd /usr/share/fonts/"Seasons_of_the_witch"

We change the file permissions

chmod +w “Season_of_the_Witch.ttf"

And voila, we have our font installed.

Tag » How To Install Fonts Through Bash Terminal