Ubuntu by default comes with a large number of fonts. These fonts are pre-installed in a newly installed Ubuntu OS. However, sometimes you may not be contented or get bored with these fonts and wish to install some additional fonts. There is a method I can show you how to achieve that as Ubuntu allows the addition of new fonts whether they are from Microsoft or from Google web fonts or any other font of your interest.
Let’s get started with the installation of fonts in Ubuntu. In this article, I will show only the installation of TrueType fonts in Ubuntu 18.04 LTS. You can apply the same method for installing other types of fonts.
Download fonts on Ubuntu
First, you will need to download TrueType fonts. You can download them from a web browser or from a Terminal using wget command.
You can find free fonts e.g. on the website fontspace.com
Run the below command as sudo to download font using wget.
$ sudo wget [URL]
Replace [URL] in the above command with the URL of the font that you want to install.
Installation of Fonts on Ubuntu
Most fonts are downloaded in a ZIP format. You will need to unzip them. Run the command in the following syntax to unzip the zipped files in the same directory.
$ unzip [filename]
Replace [filename] with the file name of the .zip file which contains the downloaded font.
You can run this command to verify if the files are unzipped. You will see the extracted .ttf file.
$ ls –l
Now open the directory where you have extracted the .ttf file. Double click on it. It will open in a Font Viewer. Here at the top of the Font Viewer, you will see the option to install the font. Click on it to start installing.
A few seconds later, you will notice the status has changed to Installed.
Installing font via Font Manager on Ubuntu
Alternatively, you can also use Font Manager to install fonts in your Ubuntu OS. For this, you will to first install Font Manager.
Launch the Terminal by pressing Ctrl+Alt+T key combinations. Run the below command in the terminal as sudo:
$ sudo apt-get install font-manager
Once the installation is finished, open Font Manager using the Ubuntu dash menu or by using the Terminal. To use the Terminal, just type font-manger in the Terminal window.
It will launch the Font Manager window. You can see here the already installed fonts, options to add new fonts and remove existing fonts.
Adding a new Font
To add a new font, click on the + button as shown in below image.
Then select the location where you have placed the downloaded file, and select the .ttf file. Then click on Open.
It will add the new font in the system. You can view the newly added fonts from the user tab in the left pane of the Font Manager window.
Removing a Font
Similarly, If you want to remove some fonts, click on the – button as shown in the below image.
A window will appear. From that window, select the fonts that you wish to remove, then click on Delete.
The selected fonts will be deleted instantly.
Installing multiple fonts at once
What if you have to install several fonts? That will be quiet inconvenient and annoying to install all those fonts one by one. Luckily, there is a way to get around this problem. I will show you how you can do that.
- Navigate to Home directory on your Ubuntu OS.
- Press Ctrl+H. It will show the hidden files.
- While in Home directory, right-click to create a folder and name it as .fonts as shown in the image below.
- Extract all the downloaded font files. Then from these files, copy all the .ttf font files that you wish to install and paste them in .fonts folder that you just created in the previous step.
Go ahead. You can use your new fonts now!
Verify and use the newly installed font
You can verify if the fonts are successfully installed. The easiest way is to check through the LibreOffice writer application in Ubuntu.
Open LibreOffice writer. From the toolbar options, scroll down to find the newly installed font from the font drop-down menu as displayed in the below image. If you find the newly installed font, it implies that the new font is installed and it is ready to use.
Set the font as a default font
If you want to use this font with every document that opens in LibreOffice writer, you can set it as a default font. Select the Tools from the top menu, then from the drop-down menu, select Options.
From the Options window, Go to LibreOffice Writer > Basic Fonts (Western), select the desired font.
Then select OK to confirm and close the window. The selected font will be set as a default font.
That was all you need to know about installing TrueType fonts in Ubuntu. Using the methods described above, you can install any fonts in Ubuntu other than just TrueType fonts.