Fonts spec template notes

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
 
(7 intermediate revisions by one user not shown)
Line 3: Line 3:
 
The following notes are intended to help new packagers understand the Fedora official fonts spec templates:
 
The following notes are intended to help new packagers understand the Fedora official fonts spec templates:
 
* our [[Simple fonts spec template|simple template]], intended for source packages that ship a single font family,
 
* our [[Simple fonts spec template|simple template]], intended for source packages that ship a single font family,
* our [[Multiple fonts spec template|multi template]], intended for source packages that ship several different font families
+
* our [[Fonts spec template for multiple fonts|multi template]], intended for source packages that ship several different font families. {{:Fonts spec template notes/multi}}
 +
 
 +
{{Admon/note|What is a font family?|{{:Fonts spec template notes/font-family}}}}
  
 
== Metadata ==
 
== Metadata ==
Line 34: Line 36:
  
 
{{:Fonts spec template notes/description}}
 
{{:Fonts spec template notes/description}}
 +
 +
=== Common description ===
 +
 +
{{:Fonts spec template notes/common_desc}}
  
 
== Building ==
 
== Building ==
Line 48: Line 54:
  
 
{{:Fonts spec template notes/fontconfig-passive-ruleset}}
 
{{:Fonts spec template notes/fontconfig-passive-ruleset}}
 +
 +
=== Documentation ===
 +
 +
{{:Fonts spec template notes/doc}}
 +
 +
== Magic ==
 +
 +
{{:Fonts spec template notes/font_pkg}}
  
 
Notes:
 
Notes:
 
<references/>
 
<references/>
{{:Fonts_SIG_signature}} [[Category:Fonts packaging|Spec template, comments]] [[Category:Documentation|Spec template, fonts, comments]][[Category:Template|Spec template, fonts, comments]]
+
{{:Fonts_SIG_signature}} [[Category:Fonts packaging|Spec template, notes]] [[Category:Documentation|Spec template, fonts, notes]]

Latest revision as of 16:35, 11 January 2009

A page of the Fonts Special Interest Group

The following notes are intended to help new packagers understand the Fedora official fonts spec templates:

  • our simple template, intended for source packages that ship a single font family,
  • our multi template, intended for source packages that ship several different font families. In this template, you must repeat blocks of instructions for every packaged font family.
Note.png
What is a font family?
  • A font family corresponds to one entry in GUI font lists. For example, DejaVu Sans, DejaVu Serif and DejaVu Sans Mono are three different font families.
  • A font family is subdivided in faces or styles. DejaVu Sans Normal, DejaVu Sans Bold, DejaVu Sans Condensed Italic are three faces of the DejaVu Sans font family.
  • A font-metadata aware tool such as gnome-font-viewer[1] or fontforge[2] can be used to check the font family name and the font face/style declared by a font file.

Contents

[edit] Metadata

[edit] Naming

Replace <FONTNAME> with something appropriate such as foundryname-fontname. For Fedora purposes a “foundry” is an entity that publishes a set of fonts with consistent QA rules[3].

If fontname already includes the font or fonts affix, drop it.

[edit] Fontconfig ruleset(s)

fontconf is the optional fontconfig ruleset for the fonts being packaged. For more information on choosing the right fontconfig priorities, see this page.

[edit] Font versions

Do not trust font metadata versionning[4], unless you've checked upstream does update versions on file changes. When in doubt use the timestamp of the most recent font file as version, for example 20081231.

[edit] Licensing

Make sure you've read and understand our legal page.

[edit] BuildRoot

Any approved buildroot choice.

[edit] Summary

Font summaries need to be short and to the point. Usual informations are font style and Unicode coverage. Only repeat the font name(s) if you don't have anything else to write.

[edit] Description

Font descriptions must detail information on the font style, Unicode coverage, and intended use[5] to help users choose the right packages to install. Also, it is considered good form to credit the original font designer and sum up the font history.

Incidentally, this is a good way to check if the licensing information declared by upstream is correct and if some fontconfig substitution rules can be added to the package.

Examples of terrific font descriptions are found on the Greek Font Society web site. This is what other font packages should strive to emulate.


[edit] Common description

It is possible to define a description block that will be reused in every sub-package description. Please do not forget to complete it with subpackage-specific information later.

[edit] Building

Building fonts from sources is always preferred. For GPLed or LGPLed fonts this is required by the license.

[edit] Installing

[edit] Fonts

Change *.ttf to the actual location of your font files (in a subdirectory, in this directory with an otf extension, etc).

[edit] Fontconfig rulesets

To package a fontconfig ruleset disabled by default:

  • install it in %{_fontconfig_templatedir},
  • create symbolic link with the same name in %{_fontconfig_confdir}, that points to /dev/null.

[edit] Documentation

Documentation usually includes licensing and other information in plain text or PDF[6] format. Make sure your text files use maximum 80 column lines with Unix-style line ends and are encoded in UTF-8.

[edit] Magic

The %_font_pkg macro takes the following arguments:

  • an optional -n name subpackage name
  • an optional -f pattern fontconfig pattern name. The corresponding files must be installed by the packager in %{_fontconfig_templatedir} and %{_fontconfig_confdir} in the %install section.
  • a list of font names or font name patterns. The corresponding files must be installed by the packager in %{_fontdir} in the %install section.

Notes:

  1. Simple, but sadly not available in each and every Fedora release.
  2. Type <CTRL> + <SHIFT> + <F> to open the font metadata window in fontforge.
  3. Thus Sourceforge is not a foundry
  4. The metadata embedded in TTF or OTF files.
  5. Print, screen, headings, code…
  6. For example, font specimen pages


Idea.png
Fonts in Fedora
The Fonts SIG takes loving care of Fedora fonts. Please join this special interest group if you are interested in creating, improving, packaging, or just suggesting a font. Any help will be appreciated.