4891
Comment: some formatting improvements
|
5203
extend examples to cover not generally usable fonts
|
Deletions are marked like this. | Additions are marked like this. |
Line 16: | Line 16: |
Line 19: | Line 20: |
Special-purpose fonts (such as e.g. web fonts of WOFF/WOFF2 type) should be stored in a different directory. | |
Line 29: | Line 29: |
Special-purpose fonts (such as e.g. web fonts of WOFF/WOFF2 type) should be stored in a different directory. As another example, the Hack font distributed in WOFF2 format should be put in the directory: `/usr/share/fonts-hack/woff2` While the Firefox emoji font distributed in TrueType format, which consists entirely of embedded non-standard images, is put in the directory: `/usr/lib/firefox/fonts` |
Contents
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:
/usr/share/fonts/opentype/linuxlibertine/
While the Rufscript font distributed in TrueType format should be put in the directory:
/usr/share/fonts/truetype/rufscript
Special-purpose fonts (such as e.g. web fonts of WOFF/WOFF2 type) should be stored in a different directory.
As another example, the Hack font distributed in WOFF2 format should be put in the directory:
/usr/share/fonts-hack/woff2
While the Firefox emoji font distributed in TrueType format, which consists entirely of embedded non-standard images, is put in the directory:
/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> 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 Fonts Team.
Mailing List: https://lists.debian.org/debian-fonts/
Packages Overview: http://qa.debian.org/developer.php?login=debian-fonts@lists.debian.org
Git Browse: https://salsa.debian.org/fonts-team
Git Checkout: git@salsa.debian.org:fonts-team/$(package_name).git
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