How to Install a Font in Linux

How to Install a Font in Linux

A font may need to be available in one Linux account without changing what other accounts can use. Installing a font makes its file available to desktop applications, and where you put it determines which accounts can use it.

This article shows how to copy a font into your user directory, then check its family name with Fontconfig, a Linux library that discovers fonts.

TL;DR

Copy the font to ~/.local/share/fonts, refresh Fontconfig with fc-cache, then reopen the application.

  • Use the per-user directory when only your account needs the font.
  • Use /usr/local/share/fonts only when you have administrator access and want the font available to other users.
  • Check discovery with fc-match and search the family name, not just the file name.

What Does Installing a Font on Linux Change?

Installing a font makes its file available to desktop applications. Fontconfig is a common Linux library that discovers fonts and matches family and style requests, though some applications keep their own font list. I check Fontconfig first to separate discovery problems from an application menu issue.

Use ~/.local/share/fonts for this account.

The user directory keeps downloaded fonts separate from distribution-managed files. Fontconfig scans nested directories, so related files can stay in a named folder.

A family may lack characters needed by a document. The renderer can use another font for those glyphs, so Latin text may look right while a less common script differs.

How to Install a Font on Linux Step by Step

For a manual install, put the font files under ~/.local/share/fonts, update the cache if needed, then check that Fontconfig can match the family. Keep the original download until the installed copy is confirmed.

Step 1: Check and extract the font files

Download a font from a trusted source and extract the archive. Use the extracted TTF or OTF files.

Copy the styles you need. Static families often use separate files for regular, bold or italic, while variable fonts can contain several settings in one file.

Use your desktop’s font viewer if it offers an Install button and you prefer a graphical route. The dialog and whether it writes to your user account vary by desktop, so check its confirmation or installed location. Copying files makes the destination explicit.

Step 2: Copy the font into your user directory

Make the directory and copy the font file, replacing the example source path and filename:

mkdir -p "$HOME/.local/share/fonts"
cp "$HOME/Downloads/ExampleFont-Regular.ttf" "$HOME/.local/share/fonts/"

Quotes preserve paths containing spaces. Use $HOME rather than a quoted tilde because the shell does not expand ~ inside quotes.

Keep the original filenames. Font metadata supplies the family and style shown by Fontconfig.

Step 3: Refresh font discovery

Running fc-cache for the user directory asks Fontconfig to rebuild or update cached font information there.

fc-cache "$HOME/.local/share/fonts"

It refreshes the user cache, not other accounts.

Step 4: Check the family name Fontconfig sees

Use the family name in this check.

fc-match 'Example Font'

The output names the selected file. A different family can indicate a name mismatch or a missing style.

In this check, the request resolves to Noto Sans rather than a custom Example Font file. That fallback means the requested family name is not installed in this environment, which is the distinction to look for after copying your own font.

NotoSans-Regular.ttf: "Noto Sans" "Regular"
Fontconfig matches Example Font to Noto Sans
The requested Example Font name resolves to the Noto Sans fallback.

Step 5: Reopen the application

Open the application’s font menu and search for the family name. If the application was already running during installation, close and reopen it so it reloads the font list. Choose the installed family in the application.

Why Is the Font Missing After Installation?

The table narrows a missing-font problem to a path, metadata or application issue.

SymptomCheckNext step
Fontconfig matches a fallbackRun fc-scan on the installed file and confirm its family nameUse that family name with fc-match
Fontconfig finds it but the app does notCheck whether the app was open before installationQuit and reopen the app
No family metadata appearsConfirm you copied an extracted TTF or OTF fileRe-extract the download and copy the font file itself
Only your account can see itCheck that the file is under your home directoryUse a shared directory only if all accounts need it

Read the selected filename when the match is unexpected.

Quote family names containing spaces in shell commands.

For all-user use, place custom files in /usr/local/share/fonts rather than package-managed /usr/share/fonts. Then refresh it:

fc-cache /usr/local/share/fonts

The command refreshes discovery after the files are placed there.

If your distribution packages the font, search its repository for the family and install the matching package with its documented package manager. Package names vary, so do not assume one distribution’s name applies to another.

Common Font Installation Errors

When an application omits a font, check the installed file and its metadata before changing a shared directory.

ProblemCheckCorrection
The family resolves to a fallbackRun fc-scan on the copied TTF or OTF file and read its family nameUse that exact family name with fc-match
The app has no font entryConfirm the file is below ~/.local/share/fontsRefresh Fontconfig and reopen the app
One style is substitutedCheck whether the requested bold or italic file was copiedCopy the missing style from the extracted family
A sandboxed app cannot see the fontCheck the app documentation for host font accessUse its supported font import or mount mechanism

Conclusion: Install for the Right Scope

For a font used by your own Linux account, copy its TTF or OTF files to ~/.local/share/fonts, refresh Fontconfig, and check the family with fc-match. Choose a shared system directory only when other accounts need the font, then reopen the applications that should display it.

For additional terminal setup, see the site’s guides to customizing a Bash shell and customizing the Arch Linux terminal.

FAQ

These answers cover the common choices after a font file is ready.

Where should I put a font for one Linux user?

Copy the font files to ~/.local/share/fonts. That location is for the current user’s account.

Do I need to run fc-cache after installing a font?

Fontconfig may detect the file automatically. Running fc-cache on the relevant font directory refreshes its cached information when the font is not discovered.

Why is my new font missing from an application?

Confirm the family name with fc-scan or fc-match, refresh Fontconfig if needed, then close and reopen the application. Some programs maintain their own font cache.