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 pkg-fonts-devel 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. The fonts 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:

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 pkg-fonts svn repository. 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 $@

# It's recommended to compress the package with xz:
override_dh_builddeb:
 dh_builddeb -- -Zxz -Sextreme -z9

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

Source: fonts-nafees
Section: fonts
Priority: optional
Maintainer: Debian Fonts Task Force <pkg-fonts-devel@lists.alioth.debian.org>
Uploaders: Christian Perrier <bubulle@debian.org>, Mohammed Adnène Trojette <adn+deb@diwi.org>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.3

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 her/him the differences between licences. When in doubt, or if you don't feel like you have the needed skills for this, please redirect her/him to the debian-legal@lists.debian.org mailing list.

Team Maintained Fonts


You are encouraged to maintain font packages as part of the Debian Font Task Force.

GIT Repository


The team is currently in the process of transferring all of its packages to GIT. All new team maintained packages should be maintained in an Alioth GIT repository.

See the Alioth Git FAQ for more information on how to work with Alioth GIT repositories.

SVN Repository


The team previously managed all its packages in an Alioth SVN repository. Some packages have not yet been moved. Packages in SVN make use of svn-buildpackage. The Debian Perl Group has produced a comprehensive guide to maintaining Debian packages in a team SVN repository. Generally, the Font Task Force uses a similar process. Please note that pkg-fonts URLs are different than pkg-perl ones.

The Alioth FAQ and Alioth SVN wiki pages may also be helpful.

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