[Pkg-fonts-devel] The 0-th (very) rough (and incomplete) draft of a Font Policy

Rogério Brito rbrito at ime.usp.br
Sat Mar 26 11:51:04 UTC 2011


Dear people,

Attached to this message is the text that I started writing some time ago
and which I have here laying on my HD, but which I have not had time to
write for the past few weeks.

You may notice that it has some controversial points which were discussed
both before and after I started writing these notes. Namely, the following:

* The definition of what a font foundry is.
* The issue of whether we should compile fonts or not for redistribution.

Let me state that while I have an opinion on the second point, I don't care
that much about the first (as long as it is sensible, in a very broad sense
of the word).

Please, criticize stuff, put it in some repository, fill it in, send
patches, give feedback, etc.

I hope that you find this kick start useful at least for causing polemic and
making us stop for a moment and think better on our modus operandi and,
eventually, distilling our best practices in a document of which that we can
be proud.


Regards,

-- 
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://rb.doesntexist.org : Packages for LaTeX : algorithms.berlios.de
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
-------------- next part --------------
Title: Debian Fonts Task Force Packaging Policy
State: DRAFT
Date: 2011-02-28
Drivers: Rogério Brito <rbrito at ime.usp.br>
Abstract:
 Propose a file layout, set of conventions and best practices for packaging
 fonts in the Debian Operating System.

# Introduction

The intention of this document is to serve as a basis on how packages
providing fonts should behave in a Debian-based system, to ensure good
interoperability with other programs.

Regarding the scope of this document, for the packaging of fonts in Debian,
the [Debian Policy][DP] serves as the general rule of how the system has to
behave. We state here only aspects that are specific to the packaging of
fonts.

This policy is a work in progress and any contributions (clarifications,
details, corrections) are welcome. Please, send feedback to the
[pkg-fonts-devel][PFD] mailing list or to [Rogério Brito][RB].  It is
appreciated if the suggestion is sent in the form of a patch, although this
is not a requirement.

# TODO

* See the work that Fedora has already done.
* See the discussions in the pkg-fonts-devel.
* Take non-Latin scripts into account.
* Fill in the sections that are not complete.
* Make the language uniform regarding must/should/etc (perhaps use the
  definitions from RFC's?).
* Correct inaccuracies.
* Replace vague assertions with well-founded references.
* Copy-edit.

# Definitions

For the purposes of this document, we assume some familiarity with computer
fonts and we seek only to standardize the language, not to provide precise
definitions (especially because some of the concepts are not Mathematically
formalizable).  We establish the language to be used with the following
terms:

*Alphabet:* an alphabet is a non-empty finite set, whose elements are called
*symbols* or *letters*.

*Word:* a sequence of symbols.

*Glyph:* an "atomic" representation of the written language. Usually, a
glyph is the drawing of a symbol, or a letter, but it may also be the
aglutination of a sequence of symbols for typographic purposes (e.g., a
ligature).

*Typeface:* a set of glyphs that are aesthetically part of a "family" and
which compose a 

*Font:* an "implementation" of the abstract concept of a typeface.

*Foundry:* the "maker(s) or implementer(s)" of a font.

# Contents of packages

For the packaging of fonts in Debian, the Debian Policy serves as the
general rule of how the system has to behave. We state here only aspects
that are specific to the packaging of fonts.

The Debian operating system uses [fontconfig][FC] and [freetype][FT] as its
primary manipulators of fonts (regular TeX engines, and older
implementations of the X Window System being two of the notable exceptions).

In Debian, the font files recognized by fontconfig can be placed either in a
system-wide or in a user-specific location.  Packages provided in Debian
have to install fonts in a system-wide location, under the directory
`/usr/share/fonts`.

# Naming of font packages

Packages that contain fonts should be named in a tiplet-form, as
fonts-*foundry*-*name*, where:

* *foundry* is the name of the foundry of the particular fonts being
  packaged, with transliterated to use lowercase Latin letters (a-z), digits
  (0-9), and plus (+), minus (-) and dots (.) to be compliant with the
  Debian Policy.

  Any space should be removed from the name of the foundry, possibly
  replaced by minus signs, at the option of the packager.
* *name* is the name of the font (or fonts) included in the package.

  For packages that include fonts of one or more families, *name* should be
  the preferred name, as established by *foundry*, without specific
  qualifications such as shapes (e.g., upright, italic, oblique/slanted,
  condensed etc.), weights (e.g., light, extra-light, medium, book, bold,
  extra-bold, black etc.), features (e.g., stylistic alternates, oldstyle
  figures etc), or similar variations.
  
  The same rules of transliteration and use of spaces as with *foundry*
  apply to *name*.
  
  In general, the name to be used as *name* can be obtained as the first
  part (that is, before any colon) of the output of the command `fc-list`
  for the particular font(s) in question.

# Types of fonts

In a very brief fashion, the fonts that we deal with commonly are basically
of two types:

* *Bitmapped fonts:* fonts whose glyphs are drawn at a fixed size by a fixed
  glyph specified by the author of the font. These fonts are usually shipped
  in files with extensions like `pcf` (possibly compressed), `fon`, `mf`
  (with their corresponding `tfm`).
* *Outline fonts:* fonts whose glyphs' *borders* are specified by formulas
   and are transformed, at the time of use by the user, as a region filled
   by some color delimited by those borders. These include PostScript Type1
   (in set of files with extensions `afm`, `pfm`, `pfb`), TrueType (in files
   with extensions `ttf` or `otf`), and OpenType fonts (in files with
   extensions `otf`).
   
There are other kinds of fonts (like, for instance, stroked fonts, fonts
mixed with both bitmaps and outlines---examples of the latter are Anonymous
Pro, and some versions of Microsoft's Cleartype fonts), but those listed
above are our focus, for the moment.

## Location of fonts in the filesystem structure of a Debian system

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/foundry-name/`, where
`fonttype` is the type (OpenType, TrueType, Type1, etc), `foundry` is the
foundry (e.g., "makers", "authors", possibly being a company, a foundation,
or simply a single person) of the fonts, and `name` is the family name of
the fonts to be installed, with any suffixes like `font` or `fonts` removed.

Each element of the path shall be transliterated and converted to lowercase
to latin letters. It is recommended that the files containing the fonts can
retain the preferred names specified by the original authors.

As an example, the [SIL Gentium][SG] fonts, which are distributed in
TrueType format should be put in the directory

    /usr/share/fonts/truetype/sil-gentium/

while the [Linux Libertine][LL] distributed in OpenType format should be put
in the directory:

    /usr/share/fonts/opentype/free-linux-libertine/

Notice that when the font does not have a unique, easily distinguished
foundry (e.g., when the font is the work of many persons under no
coordinated project or effort), but the font qualifies as Free Software
according to [Debian's Free Software Guidelines][DFSG], the foundry can be
taken as the word `free`.

## Location of fonts to be used with the TeX typesetting system

FIXME: Fill this in.

# Generation of packages

In general, packages containing fonts should not compile (e.g., transform
upstream's provided `.sfd` source files in [Fontforge][FF]'s format to OTF
files) during the construction of the package.  The binary packages in the
Debian system should include the files upstream provided.

The rationale for the paragraph above is that many fonts used in computers
are specified in formats that are potentially numerically unstable, and some
steps used to produce usable fonts may not preserve the "artistic intention"
of the designer/upstream, if not performed under the very same conditions as
those of the author of the fonts (and this includes rounding errors of
spline control points, kerning, hinting etc).

Only under special circumstances the source package should compile or
manipulate the fonts provided by upstream. Circumstances where this is
acceptable are, for instance, the removal of glyphs for reduction of the
size to fit in installation media.  In any case, the package should clearly
state that the font was manipulated in the `README.Debian` file of the
generated binary package.


[DFSG]: http://www.debian.org/social_contract
[DP]: http://www.debian.org/doc/debian-policy/
[FC]: http://www.freedesktop.org/wiki/Software/fontconfig
[FF]: http://fontforge.sf.net/
[FT]: http://www.freetype.org/
[LL]: http://linuxlibertine.sf.net/
[PFD]: mailto:pkg-fonts-devel at lists.alioth.debian.org
[RB]: mailto:rbrito at ime.usp.br
[SG]: http://scripts.sil.org/Gentium


More information about the Pkg-fonts-devel mailing list