From Fedora Project Wiki

(New page: <noinclude>{{CompactHeader|fonts-sig}} Fedora includes a large selection of font packages. Unfortunately, due to uneven upstream release practices, uneven pack...)
 
m (→‎comps: update SCM link)
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
<noinclude>{{CompactHeader|fonts-sig}}
<noinclude>{{CompactHeader|fonts-sig}}


Fedora includes a [[Fonts inclusion history|large selection]] of font packages. Unfortunately, due to uneven upstream release practices, uneven packager experience, commitment or attention to detail, uneven package complexity<ref>Especially if layers of legacy compatibility rules make the spec file hard to read or maintain.</ref>, they're not all to the same quality standard.
Fedora includes a [[Fonts inclusion history|large selection]] of font packages. Unfortunately, due to lack of strong font release conventions, variable packager experience, commitment or attention to detail, uneven package complexity<ref>Especially if layers of legacy compatibility rules make the spec file hard to read or maintain.</ref>, they're not all to the same quality standard.


This page will help you improve our font package quality pool by specifying ways you can help existing maintainers enhance their packages.
This page will help you improve our font package quality pool by specifying ways you can help enhance existing packages, and ways you can tune new packages during creation.
</noinclude>
</noinclude>


== Checking summaries and descriptions ==
== Language checks ==


[[Image:Join_ContentDeveloper.png]] [[Image:Join_Translator.png]]
[[Image:Join_ContentDeveloper.png]] [[Image:Join_Translator.png]] [[image:Join_OSDeveloper.png]]


To give users more flexibility, especially in an [[Features/AutomaticFontInstallation|automatic font installation]] context, we [[Packaging:FontsPolicy#Package_layout_for_fonts|require]] fine-grained font packages.
To give users more flexibility, especially in an [[Features/AutomaticFontInstallation|automatic font installation]] context, we [[Packaging:FontsPolicy#Package_layout_for_fonts|require]] fine-grained font packages.
Line 22: Line 22:
{{:Fonts spec template notes/description}}
{{:Fonts spec template notes/description}}


== Checking package naming ==
=== Naming ===


We have strict [[Packaging:FontsPolicy#Naming|naming]] rules that all font packages should follow. Please check they're respected.
We have strict [[:Packaging:FontsPolicy#Naming|naming]] rules that all font packages should follow. Please check they're respected.


== Checking upgrade paths ==
== Technical tests ==
[[Image:Join_OSDeveloper.png]]


{{:Checking upgrade paths}}
=== Manual checks ===


== Checking fontconfig rules ==
==== spec files ====
 
[[Using Fedora CVS|Check out]] the files the packager used, compare them to the official templates in [[fontpackages|fontpackages-devel]]<ref>Look in ''/etc/rpmdevtools/''.</ref>, and report discrepancies which have no justification.
 
Graphical diff tools such as '''meld''' can be especially helpful.
 
# yum install fontpackages-devel meld
$ meld foo.spec /etc/rpmdevtools/spectemplate-fonts-bar.spec
 
==== fontconfig rules ====


{{:Checking fontconfig rules}}
{{:Checking fontconfig rules}}


== Checking spec files ==
==== comps ====
 
Check all our font packages are properly declared in the fonts or legacy-fonts [http://git.fedorahosted.org/git/comps.git comps] [[:Packaging:FontsPolicy#Grouping|groups]] (once they are approved).


[[Image:Join_OSDeveloper.png]]
=== Automated tests ===
[[image:Join_OSDeveloper.png]]
 
==== Checking the package builds ====
 
Make sure the package builds in [[Projects/Mock|Mock]] or (if he's already a packager) in a [[Koji]] scratch build
 
==== Checking package sanity ====
 
Check the resulting packages with [[Common_Rpmlint_issues|rpmlint]]
# yum install rpmlint
$ rpmlint package1.rpm … packageN.rpm
 
==== Checking font specific issues ====
 
Check the resulting packages with repo-font-audit:
# yum install fontpackages-tools createrepo
$ mkdir /tmp/testrepo
$ mv package1.rpm … packageN.rpm /tmp/testrepo
$ createrepo /tmp/testrepo
$ repo-font-audit testrepo file:///tmp/testrepo


[[Using Fedora CVS|Check out]] the files the packager used, compare them to the official templates in [[fontpackages|fontpackages-devel]]<ref>Look in ''/etc/rpmdevtools/''.</ref>, and report discrepancies which have no justification.
==== Checking upgrade paths ====


Graphical diff tools such as '''meld''' can be especially helpful.
(when a set of packages is intended to replace another){{:Checking upgrade paths}}


<noinclude>
<noinclude>
Notes:
Notes:
<references/>
<references/>
{{:Fonts_SIG_signature}} [[Category:Fonts and text QA |Packages,existing]]</noinclude>
{{:Fonts_SIG_signature}} [[Category:Fonts and text QA |Packages, improving]] [[Category:Fonts packaging|Packages, improving]]</noinclude>

Latest revision as of 12:42, 23 March 2011

A page of the Fonts Special Interest Group

Fedora includes a large selection of font packages. Unfortunately, due to lack of strong font release conventions, variable packager experience, commitment or attention to detail, uneven package complexity[1], they're not all to the same quality standard.

This page will help you improve our font package quality pool by specifying ways you can help enhance existing packages, and ways you can tune new packages during creation.


Language checks

Join ContentDeveloper.png Join Translator.png Join OSDeveloper.png

To give users more flexibility, especially in an automatic font installation context, we require fine-grained font packages.

Unfortunately that also increases the number of summaries and descriptions font packagers need to write, and upstreams do not always provide ready-to-use text snippets[2]. Many packagers would appreciate proposals to improve those:

Summaries

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.

Descriptions

Font descriptions must detail information on the font style, Unicode coverage, and intended use[3] 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.


Naming

We have strict naming rules that all font packages should follow. Please check they're respected.

Technical tests

Join OSDeveloper.png

Manual checks

spec files

Check out the files the packager used, compare them to the official templates in fontpackages-devel[4], and report discrepancies which have no justification.

Graphical diff tools such as meld can be especially helpful.

# yum install fontpackages-devel meld
$ meld foo.spec /etc/rpmdevtools/spectemplate-fonts-bar.spec

fontconfig rules

Our fontconfig rules have many origins[5] and mistakes are common[6]. To help identify and fix them:

  • try to find a packageset that works and packageset that does not
  • compare the output of:
    fc-match -s :family=<name>:lang=<loc>
    in both cases, with <name> the font family you requested[7] and <loc> the target locale[8].
  • if necessary, identify more precisely the problem font,
  • examine the fontconfig rules shipped with the problem package,
 # yum install fontpackages-devel meld
 $ meld foo.conf /usr/share/fontconfig/templates/bar.conf


comps

Check all our font packages are properly declared in the fonts or legacy-fonts comps groups (once they are approved).

Automated tests

Join OSDeveloper.png

Checking the package builds

Make sure the package builds in Mock or (if he's already a packager) in a Koji scratch build

Checking package sanity

Check the resulting packages with rpmlint

# yum install rpmlint
$ rpmlint package1.rpm … packageN.rpm

Checking font specific issues

Check the resulting packages with repo-font-audit:

# yum install fontpackages-tools createrepo
$ mkdir /tmp/testrepo
$ mv package1.rpm … packageN.rpm /tmp/testrepo
$ createrepo /tmp/testrepo
$ repo-font-audit testrepo file:///tmp/testrepo

Checking upgrade paths

(when a set of packages is intended to replace another)

To check an upgrade path works:

  1. find a test Fedora system,
  2. make sure none of the new packages are already installed[9],
  3. install part or all of the old package set,
  4. copy the new packages to a local directory[10],
  5. run createrepo on this directory[11],
  6. point dnf to it[12],
  7. try a dnf upgrade.
  8. if that fails, try to understand why, rpm -e whatever dnf upgrade installed and repeat from step 1.


You can also use:

rpm -qp --obsoletes mypackage

… to check the obsoletes declared by one of your new packages and,

dnf list obsoletes

before the dnf upgrate to check what dnf thinks about your new packages[13].



Notes:

  1. Especially if layers of legacy compatibility rules make the spec file hard to read or maintain.
  2. Or they do not provide them in English
  3. Print, screen, headings, code…
  4. Look in /etc/rpmdevtools/.
    • default rules provided by fontconfig upstream,
    • rules written by Fedora packagers using our own templates: install fontpackages-devel and look in /usr/share/fontconfig/templates/,
    • rules written by Fedora packagers without regard for our templates,
    • rules written by font projects.
  5. While trying to:
    • workaround KDE/QT fontconfig processing bugs,
    • make sure one's font is the default for some languages,
    • make sure one's font rendering preferences are default for one font,
    … it is very easy to change settings for other fonts and create other unrelated problems.
  6. For example sans, serif
  7. For example ja-jp, zh, etc.
  8. It would confuse the tools.
  9. If you're creating them:
    1. adapt the previous spec file or create a new one,
    2. mock/koji-build the result.
  10. createrepo <directory>
  11. Use a repo file such as this one:
    [tmp]
    name=tmp
    baseurl=file:///tmp/rpm
    enabled=1
    gpgcheck=0
  12. But that won't check scriptlets and other packaging bits so do check dnf upgrade works afterwards.


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.