What follows is not meant to be a comprehensive specification or policy statement. It is meant to be a quick introduction to font packaging in Debian. You are encouraged to ask on the debian-fonts mailing list if you have any questions regarding fonts in Debian that are not covered below.

Font Naming

Packages that contain fonts should be named in the form of a tuple, such as fonts-name. If desired the foundry (maker of the font) may be included as well, i.e. fonts-foundry-name.

Font Location

The files corresponding to a given font are installed in directories dependent on the type and name of the font.

Fonts that are meant to be discovered by fontconfig must be stored in a directory named as /usr/share/fonts/fonttype/name/, where fonttype is the type (?OpenType, TrueType, Type1, etc).

As an example, the Linux Libertine fonts distributed in ?OpenType format should be put in the directory:

While the Rufscript font distributed in TrueType format should be put in the directory:

Any general-purpose font meant to be used by X11/Wayland/XeLaTeX/GD/... programs should be put into those directories.

This doesn't apply to other kinds of fonts. Obviously, fonts for Linux console (.psf and others) can't be used this way.

Likewise, web fonts (WOFF/WOFF2) despite being supported by _some_ GUI programs, cause problems when exposed via fontconfig, thus they should be stored elsewhere. For example, the Hack font distributed in WOFF2 format can be put in the directory: /usr/share/fonts-hack/woff2 (there's currently no specific policy for web fonts).

Even nominally TrueType fonts that are unusable by arbitrary programs, such as the Firefox emoji font which consists entirely of embedded non-standard images, or a font with game icons encoded at codepoints clashing with Unicode, should be put elsewhere. The former uses /usr/lib/firefox/fonts

Packaging Example

What follows is an example of how to prepare a very simple font package. This has been made really easy thanks to debhelper. More complex packages can be found in the git repository of the fonts team. These existing packages can and should serve as examples.

For this example, we will look at the font package fonts-nafees. The font is distributed upstream as a single font file, NafeesWeb.ttf.

And we would like to see it installed as a TrueType font, at /usr/share/fonts/truetype/nafees.

Nothing is easier with dh_install. Just add this to your debian/install file:

*.ttf usr/share/fonts/truetype/nafees

Only a minimal dh style debian/rules file is needed.

        dh $@

The debian/control file for the package looks like this:

Source: fonts-nafees
Section: fonts
Priority: optional
Maintainer: Debian Fonts Team <debian-fonts@lists.debian.org>
Uploaders: Christian Perrier <bubulle@debian.org>, Mohammed Adnène Trojette <adn+deb@diwi.org>
Rules-Requires-Root: no
 debhelper-compat (= 13),
Standards-Version: 4.6.1
Homepage: https://fontlibrary.org/en/font/nafees-nastaleeq
Vcs-Browser: https://salsa.debian.org/fonts-team/fonts-nafees
Vcs-Git: https://salsa.debian.org/fonts-team/fonts-nafees.git

Package: fonts-nafees
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}
Description: nafees free OpenType Urdu fonts
 This is a free OpenType Urdu font (Nafees Web Naskh), designed and
 developed by the Center for Research in Urdu Language Processing
 (CRULP, http://www.crulp.org/) at National University of Computer and
 Emerging Sciences (http://www.nu.edu.pk/).

Note that the Section is set to fonts.

And you are done with the technical part of your package. Now be really careful about the font licensing and fill debian/copyright accordingly and accurately. Upstream fonts very often lack clear information about the font license so you might need to talk with the font author. Even be prepared to explain to them the differences between licences. When in doubt, or if you don't feel like you have the needed skills for this, please redirect them to the debian-legal@lists.debian.org mailing list.

Team Maintained Fonts

You are encouraged to maintain font packages as part of the Debian Fonts Team.

Git Repository

All new team maintained packages should be maintained in Salsa Git repository.

See the Salsa page for more information on how to work with Salsa Git repositories.

In October 2014, the team finished transferring all of its packages from the previous Subversion repositories to Git.

Further Discussion

There is currently discussion on the pkg-fonts-devel mailing list that hopes to lead to a more comprehensive policy.

Rogério Brito maintains a draft proposal for the "Fonts Policy of Debian" at: http://anonscm.debian.org/gitweb/?p=users/rbrito-guest/fonts-policy.git;a=summary

Nicolas Spalinger has also contributed to the discussion: http://anonscm.debian.org/viewvc/pkg-fonts/people/yosch/debian-font-packaging-policy.txt