Managing Fonts in Debian

Updated 28-Jun-2024

How to manage fonts in Debian (installing/removing/refreshing).

Microsoft Core Fonts Installer

Check to see if this is installed via apt-cache

sudo apt-cache search ttf-mscorefonts-installer

Emoji fonts

Yeh, I don't like them but people use them so need to see them.

sudo apt install fonts-noto-color-emoji

Debian and application fonts

There is a large number of fonts installed via Debian and basic X11, as well as applications (such as LibreOffice).

In order to reduce these, it will be necessary to create a script to get rid of these. Even better:

  • Figure out which fonts can be removed, from where
  • Remove those directories
  • Add fonts using symlinks to repositories
  • Update the repositories regularly (figure out how to do this)

Copy Fonts to Directories

/usr/share/fonts
/usr/share/X11/fonts
/usr/local/share/fonts
~/.fonts

Note, better/easier to symlink to /usr/share/fonts/ if organized with a set of font directories. Example:

First remove font shares:

sudo rm -rf /usr/share/fonts/other-fonts
sudo rm -rf /usr/share/fonts/code-128-fonts
sudo rm -rf /usr/share/fonts/thai-fonts

Then add font shares

sudo ln -s /home/jeff/sync/fonts /usr/share/fonts/other-fonts
sudo ln -s /home/jeff/sync/github/code-128-font/fonts /usr/share/fonts/code-128-fonts
sudo ln -s /home/jeff/sync/github/thai-font-collection/downloadable-free-thai-fonts /usr/share/fonts/thai-fonts
sudo ln -s /home/jeff/sync/additional-fonts /usr/share/fonts/additional-fonts

Rebuild the Font Cache

sudo fc-cache -fv

List all Installed and Cached Fonts

fc-list

Reconfigure Fonts

This may be needed to support bitmap fonts.

dpkg-reconfigure fontconfig-config