Differences between revisions 10 and 11
Revision 10 as of 2011-10-26 01:46:03
Size: 4916
Comment:
Revision 11 as of 2017-04-04 00:15:21
Size: 33
Editor: PaulWise
Comment: duplicate page, outdated
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<<TableOfContents()>>

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 [[http://lists.alioth.debian.org/pipermail/pkg-fonts-devel/|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:
 
   `/usr/share/fonts/opentype/linuxlibertine/`

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

   `/usr/share/fonts/truetype/rufscript`


== 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 [[http://anonscm.debian.org/viewvc/pkg-fonts/|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/fonts-nafees}}}.

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

{{{
*.ttf usr/share/fonts/truetype/fonts-nafees
}}}

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

{{{
#!/usr/bin/make -f
%:
 dh $@
}}}

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
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 [[http://pkg-fonts.alioth.debian.org/|the Debian Font Task Force]].

 * Mailing List: http://lists.alioth.debian.org/pipermail/pkg-fonts-devel/
 * Packages Overview: http://qa.debian.org/developer.php?login=pkg-fonts-devel@lists.alioth.debian.org
 * SVN Browse: http://anonscm.debian.org/viewvc/pkg-fonts/
 * SVN Checkout: `svn://svn.debian.org/svn/pkg-fonts`

=== SVN Repository ===
----

The team manages all its packages in an Alioth SVN repository and makes use of `svn-buildpackage`. The Debian Perl Group has produced [[http://pkg-perl.alioth.debian.org/subversion.html|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 [[http://wiki.debian.org/Alioth/FAQ|Alioth FAQ]] and [[http://wiki.debian.org/Alioth/Svn| Alioth SVN]] wiki pages may also be helpful.

== Further Discussion ==
----

There is currently discussion on the [[http://lists.alioth.debian.org/pipermail/pkg-fonts-devel/|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
#REDIRECT Fonts/PackagingPolicy