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