Initial commit
[profile/ivi/fontpackages.git] / fontconfig-templates / l10n-font-template.txt
1 ▶ Documentation for l10n-font-template.conf
2
3 This advanced template replaces the first rule of the basic template with a
4 locale-specific one. It includes two rules:
5 — the first one tells fontconfig it can use the font named [fontname] when an
6 application asks for the generic family [genericname], but only for the [loc]
7 locale code.
8 — the second one tells fontconfig it can complete the font named [fontname]
9 with glyphs taken from fonts registered under [genericname].
10
11 The typical use-case are CJK fonts, since the so-called “Han unification”
12 Unicode.org decision made different locales share the same code-points even
13 though the associated glyphs are supposed to be drawn differently for each of
14 them.
15
16 If you have different needs, take a look at the other templates.
17
18 Please replace [fontname], [genericname], and [loc] with the appropriate values
19 in the following blocks of instructions.
20
21 A [fontname] example would be:
22 DejaVu Sans
23 It's the name under which the font appears in GUI font drop-downs.
24
25 Fontconfig generics ([genericname]) currently include:
26 — sans-serif
27 — serif
28 — monospace
29 — fantasy
30 – cursive
31
32 A [loc] example would be:
33 zh-cn
34
35 You may want to add more lines for [loc] to allow matching ll as well as ll-cc,
36 however this is unsafe as a “foo” [loc] will match both foo and bar-foo. It is
37 better to list all ll-cc locales explicitely.
38
39 Processing the resulting file through xmllint with the "format" flag is usually
40 a good idea.
41 $ xmllint --format -o [XX]-[fontname].conf [yourfile]
42 The output file will be named:
43 [XX]-[fontname].conf
44 where [XX] should be a two-digit number corresponding to the font priority in
45 fontconfig.
46
47 © 2008-2009 Nicolas Mailhot <nim at fedoraproject dot org>