How to install fonts on Raspberry Pi?

Since I needed to add a lot of fonts on my Raspberry Pi during a recent project, I thought it would be helpful to other people if I explain how to do it

How to install additional fonts on Raspberry Pi?
Well, most of the time it’s pretty simple. Just download a .ttf file on the website of your choice, open it and click install. There are also packages of fonts in some Raspbian repositories that allow you to install several at once

We will now see this in detail:
– Why would you need additional fonts?
– Where can you download new fonts?
– How to install fonts on your Raspberry Pi?
– How to use fonts later in my favorite software?

Why would you need additional fonts?

A font is a graphic representation of a text, with different shapes, accentuations, or thicknesses of characters

Fonts are used in our everyday tools
If you create a text file, a PowerPoint presentation, a website or an infographic, you will use different fonts (Arial, Times, Verdana, …)

It can be useful to install new fonts on Raspberry Pi :

  • to see websites with their original fonts
  • to create images with a beautiful font
  • to participate in collaborative projects with people who are not under Linux without losing the fonts they have chosen

Where can you download and install new fonts?

One specific font

To download a new font on your Raspberry Pi, you must look for websites that offer a catalog of fonts

For example, the following links provide this kind of service:
FontSquirrel
1001Fonts
DaFont

Once you have chosen your favorite website, follow these steps to add a font to your Raspberry Pi :

  1. Choose the font that interests you
  2. Download the corresponding file
  3. Unzip this file
    unzip source-sans-pro.zip

    You can also use a graphical tool to unzip the file

  4. Open the .otf or .ttf file
  5. Install the font on the Raspberry Pi by clicking “Install Font”

If you have a complete folder of fonts to install, you can do this :

cp *.otf ~/.fonts/
cp *.ttf ~/.fonts/
fc-cache -v -f

This commands will move and install all fonts at once

Fonts package

If you’re looking for more compatibility with fonts from other systems (Microsoft for example), know that there are several packages of fonts in the repositories

The best known of them allows to recover fonts that you get on Windows, and are therefore often used in documents or websites, but you can not load from your Raspberry Pi
For example, if you open a document that uses the well-known “Times New Roman” font, it is not available on Raspberry Pi

To install them, you will have to follow these steps (to adapt according to the package you want to install):

  1. Update your apt cache
    sudo apt-get update
  2. Install the package
    sudo apt-get install ttf-mscorefonts-installer

    Press enter to accept installing the package

After a few moments, the package is installed, and the Windows fonts are now available on your Raspberry Pi

How to use fonts later in my favorite software?

Now that you have installed your new fonts, how do you use them?

Well it’s effortless, in most cases there is nothing else to do, just install them and they are available immediately in all software
If the software was already open, you will need to restart it, or at worst reboot the Raspberry Pi
But otherwise, it’s already functional 🙂

As you can see below in my LibreOffice Writer, I already have all the new fonts available

libreoffice fonts

Font Manager

If you need a graphical tool to manage your fonts, know that there is the Font Manager package
This tool allows you to see the fonts installed on the Raspberry Pi and to search for one corresponding to your needs using different criteria :

  • Family Kind
  • Spacing
  • Slant
  • Weight
  • Width
  • Filetype
  • License
  • Vendor

This tool looks like this :

There are a lot of other functions that I’ll let you try, such as disabling fonts, comparing fonts or customizing the display colors to understand better how it will look like on your final support

Conclusion

It was a rather short post, but it allowed us to go around the subject
Now you know what fonts are, why to install new ones, find them on the Internet and install them
You also discover a software that allows you to manage them

If you have any further questions on this topic, feel free to ask in the comments below

Leave a Comment