Translation(s): English - Français - 한국어 - Português (Brasil)


Adding fonts

Packages

Fonts can be added system-wide to Debian by installing the appropriate package; fonts are specified in the “Fonts” section. As default system-wide fonts will be installed into /usr/share/fonts by the package-manager.

Notes:

Manually

Install a font manually by downloading the appropriate .ttf or otf files and placing them into /usr/local/share/fonts (system-wide), ~/.local/share/fonts (user-specific) or ~/.fonts (user-specific). These files should have the permission 644 (-rw-r--r--), otherwise they may not be usable.

Run fc-cache to update the font cache (add -v for verbose output). The above mentioned paths can be customized in the fontconfig configuration file at /etc/fonts/fonts.conf – you can also include subdirectories or links, which is useful if you have a directory of fonts on a separate hard drive (or partition or other location).

If you are installing bit map fonts you might need to enable this with dpkg-reconfigure:

  # dpkg-reconfigure fontconfig-config

Then enable bit maps font in the third screen.

GNOME users can simply open a Nautilus window to fonts:// and drag&drop the font files in there.

You can verify the fonts are present by looking for them in an application (such as a word processor), or by using the command fc-list. A python based graphical utility, font-manager, is also available to preview all installed and available fonts.

Configuration

fontconfig is the underlying configuration tool; you may find the following programs useful:

To view a list of monospaced client-side fonts (available from Xft, so it is possible to apply font hinting and antialiasing):

  $ fc-list :spacing=mono

To view a list of server-side (available directly from X server, so font hinting and antialiasing are not available) monospaced fonts:

  $ xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-m*'
  $ xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-c*'

You may also find the following useful to change the default font rendering:

  $ dpkg-reconfigure fontconfig-config
  $ dpkg-reconfigure fontconfig

Font lists

The page http://www.miriamruiz.es/debfonts/ (Wayback) displays the fonts contained in some packages, but the list of packages and fonts isn't updated any more.

The Debian Fonts Review service needs to be revived.

The Free Font Compilation is is also no longer updated. A new version of it is here: Free Font Compilation with each font (from Google Web Fonts) as .deb and .rpm

Various libre fonts are missing from Debian and need to be packaged.

Commonly Used Fonts

The fonts-recommended package provides a list of recommended fonts that, in the opinion of certain members of the Debian Fonts team, are suitable for most GUI systems.

The fonts-liberation or fonts-liberation2 package supplies fonts with the same metrics as Times, Arial and Courier. These fonts are named Liberation and are present in most cases. If you require the non-free original Microsoft fonts the ttf-mscorefonts-installer package (in contrib) can be used to obtain them.

East Asian fonts: fonts-arphic-uming fonts-wqy-zenhei fonts-sazanami-mincho fonts-sazanami-gothic fonts-unfonts-core

(from Wikipedia: Help:Multilingual support (East Asian))

If you want to use non-free fonts like Calibri which originate from Microsoft Office, you can download and install them (gratis) from the Microsoft Powerpoint Viewer.

Screenshots of Fonts in Debian

With: http://screenshots.debian.net/packages?search=fonts-&show=with

Without: http://screenshots.debian.net/packages?search=fonts-&show=without

Troubleshooting

If fonts do not display properly, you may want to make sure the right font gets loaded, for example with:

fc-match -s Helvetica

If it doesn't, you may want to regenerate the caches with:

dpkg-reconfigure fontconfig fontconfig-config

You can also run this as a user with fc-cache -fv.

Otherwise, you can also look at the font in a viewer like font-manager.

Individual font rendering can be tested directly with the ftview program available in the freetype2-demos package. For example, here is how to show sample glyphs from the Liberation Mono font using the 3.5 and 4.0 rendering engines:

FREETYPE_PROPERTIES="truetype:interpreter-version=35" ftview 16 /usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf  &
FREETYPE_PROPERTIES="truetype:interpreter-version=40" ftview 16 /usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf  &

This was quite useful to diagnose changes in the engine after the Debian buster upgrade, described in 866685.

Bugs

Usertags

The fonts team will use these tags for usertags (user: pkg-fonts-devel@lists.alioth.debian.org)

Font design and formats

Source Font Formats

Generating Fonts from Source

The upstream build system should always be used for generating fonts. If upstream does not have a build system, then it is a good idea to contribute one to them based on the following Free Software tools.

The fontforge is an editor for outline and bitmap fonts that generates all kinds of fonts. It is also scriptable and has an addon tool xgridfit for hinting. Fonts using these tools can be found using these commands:

apt-cache rdepends fontforge
apt-cache rdepends xgridfit

Maybe this is more useful to find packages that build from source with fontforge or fontmake (will not work with multi-line Build-Depends):

apt-cache search ^fonts- | awk '{print $1}' | while read a; do echo -ne "$a "; apt-cache showsrc $a | grep Build-Depends; done

There is also birdfont and ttfautohint and fontmake

Output Font Formats

ttf, otf, bdf, pfb, fnt, woff

Font Tools

Tool

Debian package

Comments

bdf2sfd

bdf2sfd

Convert BDF bitmap font to vector format (fontfourge source)

texlive-font-utils

texlive-font-utils

Programs for font conversion, testing, and other manipulation.

fttools

lcdf-typetools

tools for ?OpenType, multiple-master, and Type 1 fonts

ttf2tex

freetype1-tools

ttf2pt1

Font converter from TrueType to Adobe Type1.

otf2bdf

otf2bdf

Command line utility that generates BDF bitmap fonts from ?OpenType fonts.

fonttools

fonttools

A Python library to open and manipulate OTF and TTF files.

GTK+ Font Manager

font-manager

Python program to show and compare fonts

GNOME Font Viewer

gnome-font-viewer

Simple interface to show a preview of all fonts installed

There are several font tools which are not included in Debian, but are used to produce fonts included in Debian:

{i}

Available in Debian although not yet in stable.

{*}

Someone is working on inclusion into Debian.

{o}

Someone requested inclusion into Debian.

{X}

Someone needs to file an RFP or ITP bugreport and update this page with resulting bug number.

/!\

Was available in Debian but is not part of stable or unstable.

Tool

Comments

{o} https://github.com/ayoy/fontedit

962120

{i} defcon

806513

{i} booleanOperations

806516

{i} cu2qu

868004

{i} fontmake

865283

{i} glyphsLib

868005

{i} MutatorMath

806503

{i} ufo2ft

868006

{i} fnt

984461

{i} vfit

1001777

{*} bdf2sfd

951034

{*} psftools

874548

{X} mkspecimen

Font specimen generator, inspired by Wikipedia version

{X} debian2appstream

AppStream metadata generator for fonts (pregenerated fonts- entries) (a dh_font deb helper script should be made) this is good if you want the fonts to appear in the gnome/kde app stores

Further Resources

Reference manual

Wiki pages

* tahoma

Outdated

Old, retained for historical interest and reference: