How To Install a Font on GNU Linux? – Step-by-Step Guide

How To Install a Font on GNU Linux

Table of Contents

Get up to 50% off now

Become a partner with CyberPanel and gain access to an incredible offer of up to 50% off on CyberPanel add-ons. Plus, as a partner, you’ll also benefit from comprehensive marketing support and a whole lot more. Join us on this journey today!

Fonts play an essential role in bringing out the visual appeal of your system. Due to the flexibility and intense customization of Linux, you can easily install fonts according to your user preferences and skill levels. 

Whether you are a developer or a designer who enjoys personalization, installing custom fonts for your style will enhance your Linux experience. 

This guide will answer the question of the hour “ how to install a font on GNU Linux?” with easy steps.

Types of Font formats on GNU Linux 

There are seven basic types of font formats supported by GNU Linux. 

  1. TrueType Fonts (TTF)

True type is one the most widely used font formats, developed by Apple and Microsoft. This font format is supported by multiple operating systems. 

Usage in Linux:

Tech Delivered to Your Inbox!

Get exclusive access to all things tech-savvy, and be the first to receive 

the latest updates directly in your inbox.

  • Installed in /usr/share/fonts/ or ~/.fonts/ directory.
  • Managed by Fontconfig and rendered using FreeType.
  1. OpenType Fonts (OTF)

Open type fonts are an extension of True type fonts, but it includes advanced typography features. 

Usage in Linux:

  • Preferred for professional design and publishing applications.
  • Installed similarly to TrueType fonts.
  1. PostScript Type 1 Fonts (PFB/PFM)

PostScript fonts are developed by Adobe, where they were widely used in professional publishing before OpenType became the default. 

Usage in Linux:

  • Still supported via Ghostscript for handling PostScript and PDF documents.
  • Can be converted to OpenType using FontForge.
  1. Bitmap Fonts (BDF/PCF/FON)

Bitmap fonts store glyphs as pixel grids instead of scalable outlines. They are useful for terminal applications and low resolution displays. 

Usage in Linux:

  • Frequently used in command-line interfaces and embedded systems.
  • Installed in /usr/share/fonts/X11/misc/ for Xorg.
  • Managed using tools like xfontsel and mkfontdir.
  1. Web Fonts (WOFF/WOFF2)

Web open font format (WOFF) is optimized for web applications and is a compressed version of TrueType or OpenType formats. 

Usage in Linux:

  • Web browsers like Firefox and Chromium support WOFF/WOFF2 natively.
  • Can be manually converted to TTF/OTF for offline use using FontForge.
  1. SVG Fonts

SVG font format is stored in a vector shape in Scalable Vector Graphics (SVG) format.

Usage in Linux:

Enhance Your CyerPanel Experience Today!
Discover a world of enhanced features and show your support for our ongoing development with CyberPanel add-ons. Elevate your experience today!

  • Supported in some browsers and applications like Inkscape.
  • Can be converted to OpenType using tools like FontForge.
  1. Ghostscript Fonts

Ghostscripts are used for rendering PostScript and PDF files. 

Usage in Linux:

  • Installed in /usr/share/ghostscript/fonts/.
  • Used by applications like Evince and GSView for PDF rendering.

Related Article: How to Run Android Apps on Linux? – A Complete Guide

How To Install A Font On GNU Linux

Linux allows you to install a font in multiple different manners, you could do it for either single user or a system-wide change. 

  1. Checking Installed Fonts

Before installing a new font, you should check out which fonts are already installed on your system. You can do by the following methods: 

Using Font Manager (GUI)

Most Linux distributions come with a Font Manager application to keep an eye on the installed fonts. 

Using the Command Line

You can use the following commands: 

  • Check available fonts:

fc-list

  • Search for a specific font:

fc-list | grep “FontName”

  • Get font information:

fc-match “FontName”

  1. Downloading Fonts

Fonts can be downloaded from various sources:

Download fonts in TTF (.ttf) or OTF (.otf) format, as they are widely supported.

  1. Installing Fonts for a Single User

If you are installing fonts for a single user only, you can follow these steps: 

  • Create the fonts directory (if it doesn’t exist):

mkdir -p ~/.local/share/fonts

(Some distributions may use ~/.fonts/ instead.)

  • Copy the downloaded font files:

cp ~/Downloads/*.ttf ~/.local/share/fonts/

  • Update the font cache:

fc-cache -fv

  • Verify the font installation:

fc-list | grep “FontName”

This method ensures that the installed fonts are only available to the current user.

  1.    Installing Fonts System-Wide

To install fonts for all users on the system, follow these steps:

  • Move the fonts to the system-wide directory:

sudo mkdir -p /usr/share/fonts/custom

sudo cp ~/Downloads/*.ttf /usr/share/fonts/custom/

  • Set proper permissions:

sudo chmod 644 /usr/share/fonts/custom/*

sudo fc-cache -fv

  • Verify installation:

fc-list | grep “FontName”

Using this method, all the fonts that you install will be accessible to all users. 

  1. Installing Microsoft Fonts (Optional)

A lot of users are interested in Microsoft fonts like Arial, Times New Roman, and Verdana for compatibility reasons. These fonts can be accessed by the ttf-mscorefonts-installer package.

Install Microsoft Fonts on Debian/Ubuntu:

sudo apt update

sudo apt install ttf-mscorefonts-installer

Install Microsoft Fonts on Fedora:

sudo dnf install curl cabextract xorg-x11-font-utils fontconfig

sudo dnf install https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm

Install Microsoft Fonts on Arch Linux:

sudo pacman -S ttf-ms-fonts

Once installed, you need to refresh the font cache, using the following command: 

fc-cache -fv

Updating Font Cache

After installing a new font, you need to update the cache for the system to refresh. 

  • Update Font Cache for a Single User

If fonts were installed in ~/.local/share/fonts/ or ~/.fonts/, update the cache using:

fc-cache -fv

  • Update System-Wide Font Cache

For fonts installed in /usr/share/fonts/, run:

sudo fc-cache -fv

  • Check If Font Cache is Updated

To confirm that the font cache has been updated, list the fonts again:

fc-list

Verifying Installed Fonts

After updating the cache, you can test and verify that newly installed fonts are available on your system. 

  • List All Installed Fonts

fc-list

  • Check If a Specific Font is Installed

Replace FontName with the font you want to check:

fc-list | grep “FontName”

  • Find the Default System Font

fc-match

  • Check Available Font Paths

fc-list :family

Troubleshooting Font Issues

IssuePossible CauseSolution
Installed font not showing upFont cache not updated or incorrect directory– Run fc-cache -fv to refresh cache- Ensure font is in ~/.local/share/fonts/ or /usr/share/fonts/- Verify installation with `fc-list
Corrupt or unreadable font filesFile permissions incorrect or font file is corrupt– Check file permissions: ls -l ~/.local/share/fonts/- Set correct permissions: chmod 644 ~/.local/share/fonts/*- Re-download font from a reliable source
Microsoft fonts not installing properlyPackage installation failure or license agreement not accepted– Reinstall package:sudo apt remove –purge ttf-mscorefonts-installersudo apt install ttf-mscorefonts-installer- Accept license agreement if prompted
Fonts not rendering properlyMissing font rendering libraries (FreeType, Fontconfig)– Check if libraries are installed:`dpkg -l

Wrapping Up – How To Install A Font On GNU Linux

Installing new fonts on GNU Linux is quite simple, all you need to do is follow these steps to ensure that you successfully do so. You can either install fonts for a single user or multiple users, depending on your requirements.

Frequently Asked Questions

1. How To Install A Font On GNU Linux Manually?

You can manually install a font by copying the .ttf or .otf file to ~/.fonts/ (for a single user) or /usr/share/fonts/(for system-wide use), then running fc-cache -fv to update the font cache.

2. Where are fonts stored on GNU/Linux?

System-wide fonts are stored in /usr/share/fonts/, while user-specific fonts go in ~/.fonts/ or ~/.local/share/fonts/.

3, Can I use Microsoft or Google fonts on GNU/Linux?

Yes, you can install Microsoft fonts with:
sudo apt install ttf-mscorefonts-installer

Marium Fahim
Hi! I am Marium, and I am a full-time content marketer fueled by an iced coffee. I mainly write about tech, and I absolutely love doing opinion-based pieces. Hit me up at [email protected].
Unlock Benefits

Become a Community Member

SIMPLIFY SETUP, MAXIMIZE EFFICIENCY!
Setting up CyberPanel is a breeze. We’ll handle the installation so you can concentrate on your website. Start now for a secure, stable, and blazing-fast performance!