The default installation of the Fedora Linux (Fedora) includes several basic fonts that are probably all you need for the common life. However, if you plan to use your Fedora as a graphic station for typesetting, processing and designing purposes, these fonts will probably not be enough. In that situation, you want to add new fonts to your system.

Adding new fonts as the superuser

System fonts are available to all system users. If you need to add system fonts, you have two ways to do it:

  1. You can use the dnf package manager to install font packages,

  2. or you can manually add fonts to the system and update the font cache to make them available to the users.

Warning

By adding systemwide fonts manually, you will not be able to control them with the package manager. If the font is provided as a distribution package, you should always use the package manager to install it.

Installing new fonts with dnf

Whenever you can add new fonts by installing a font package with the dnf package manager, you should do so. This method gives you enough control over the font package in the future, such as updating the package and removing it from the system.

To install a font package with dnf:

Before you start
  • Add and enable repositories with font packages.

    Note

    A lot of fonts are available from the RPMfusion repository. To enable the repository on your system, follow the instructions on the RPMfusion webpage.

Procedure
  1. List all available font packages from enabled repositories.

    $ sudo dnf search fonts
  2. Install the package you need.

    $ sudo dnf install libreoffice-opensymbol-fonts.noarch
More information
  • The dnf search fonts command lists all available font packages, as well as a their descriptions.

Installing new fonts manually

When you need to install fonts that are not available in a repository, you can install them manually by copying the font files into a system font directory and updating the font cache.

Procedure
  1. Create a new directory in the system’s font directory /usr/share/fonts, where you will place the font files.

    $ sudo mkdir /usr/share/fonts/robofont
  2. Copy the font file to the font’s directory created in the previous step.

    $ sudo cp ~/fonts/robofont.ttf /usr/share/fonts/robofont
  3. Update the font cache.

    $ sudo fc-cache -v

Adding new fonts as a user

When you do not have superuser access to install fonts on the system level, or you only need to install a font that will be available to your user account only, there are two methods to do it.

Adding new local fonts with the Gnome Font Viewer

The Gnome Font Viewer is an application to display the fonts installed on the system. Besides that, it also allows you to locally install fonts. To add a new font file with Gnome Font Viewer:

Before you start
  • Make sure you have installed the gnome-font-viewer package.

Procedure
  1. Open a file manager.

  2. Double-click on a font file to open it in the Gnome Font Viewer.

  3. Click on the blue Install button on the top bar.

    Note

    Currently, there is a bug in the application. When you click on the Install button, it does not inform you back about the result of the operation, but the font is already installed.

More information
  • Gnome Font Viewer copies the font files to a font directory in the current user’s directory .local/share/fonts and updates the font cache.

Adding new local fonts manually

If you do not want to use any tools to add new fonts, you can do it manually. You have to copy the font files in the .fonts directory placed in the user’s directory and update the font cache.

Before you start
  • If it does not exist, create a .fonts directory in your user’s home directory.

Procedure
  1. In the .local/share/fonts directory, create a new directory to place your fonts files.

    $ mkdir ~/.local/share/fonts/robofont
  2. Copy the font file in the newly created directory.

    $ cp robofont.ttf ~/.local/share/fonts/robofont
  3. Update the font cache.

    $ fc-cache -v