Blame fontconfig-templates/l10n-font-template.txt

Packit 46375d
▶ Documentation for l10n-font-template.conf
Packit 46375d
Packit 46375d
This advanced template replaces the first rule of the basic template with a
Packit 46375d
locale-specific one. It includes two rules:
Packit 46375d
— the first one tells fontconfig it can use the font named [fontname] when an
Packit 46375d
application asks for the generic family [genericname], but only for the [loc]
Packit 46375d
locale code.
Packit 46375d
— the second one tells fontconfig it can complete the font named [fontname]
Packit 46375d
with glyphs taken from fonts registered under [genericname].
Packit 46375d
Packit 46375d
The typical use-case are CJK fonts, since the so-called “Han unification”
Packit 46375d
Unicode.org decision made different locales share the same code-points even
Packit 46375d
though the associated glyphs are supposed to be drawn differently for each of
Packit 46375d
them.
Packit 46375d
Packit 46375d
If you have different needs, take a look at the other templates.
Packit 46375d
Packit 46375d
Please replace [fontname], [genericname], and [loc] with the appropriate values
Packit 46375d
in the following blocks of instructions.
Packit 46375d
Packit 46375d
A [fontname] example would be:
Packit 46375d
DejaVu Sans
Packit 46375d
It's the name under which the font appears in GUI font drop-downs.
Packit 46375d
Packit 46375d
Fontconfig generics ([genericname]) currently include:
Packit 46375d
— sans-serif
Packit 46375d
— serif
Packit 46375d
— monospace
Packit 46375d
— fantasy
Packit 46375d
– cursive
Packit 46375d
Packit 46375d
A [loc] example would be:
Packit 46375d
zh-cn
Packit 46375d
Packit 46375d
You may want to add more lines for [loc] to allow matching ll as well as ll-cc,
Packit 46375d
however this is unsafe as a “foo” [loc] will match both foo and bar-foo. It is
Packit 46375d
better to list all ll-cc locales explicitely.
Packit 46375d
Packit 46375d
Processing the resulting file through xmllint with the "format" flag is usually
Packit 46375d
a good idea.
Packit 46375d
$ xmllint --format -o [XX]-[fontname].conf [yourfile]
Packit 46375d
The output file will be named:
Packit 46375d
[XX]-[fontname].conf
Packit 46375d
where [XX] should be a two-digit number corresponding to the font priority in
Packit 46375d
fontconfig.
Packit 46375d
Packit 46375d
© 2008-2009 Nicolas Mailhot <nim at fedoraproject dot org>