fontconfig-user.txt revision ca08ab68
1                                   fonts-conf
2
3Name
4
5   fonts.conf -- Font configuration files
6
7Synopsis
8
9      /etc/fonts/fonts.conf
10      /etc/fonts/fonts.dtd
11      /etc/fonts/conf.d
12      $XDG_CONFIG_HOME/fontconfig/conf.d
13      $XDG_CONFIG_HOME/fontconfig/fonts.conf
14      ~/.fonts.conf.d
15      ~/.fonts.conf
16
17Description
18
19   Fontconfig is a library designed to provide system-wide font
20   configuration, customization and application access.
21
22Functional Overview
23
24   Fontconfig contains two essential modules, the configuration module which
25   builds an internal configuration from XML files and the matching module
26   which accepts font patterns and returns the nearest matching font.
27
28  Font Configuration
29
30   The configuration module consists of the FcConfig datatype, libexpat and
31   FcConfigParse which walks over an XML tree and amends a configuration with
32   data found within. From an external perspective, configuration of the
33   library consists of generating a valid XML tree and feeding that to
34   FcConfigParse. The only other mechanism provided to applications for
35   changing the running configuration is to add fonts and directories to the
36   list of application-provided font files.
37
38   The intent is to make font configurations relatively static, and shared by
39   as many applications as possible. It is hoped that this will lead to more
40   stable font selection when passing names from one application to another.
41   XML was chosen as a configuration file format because it provides a format
42   which is easy for external agents to edit while retaining the correct
43   structure and syntax.
44
45   Font configuration is separate from font matching; applications needing to
46   do their own matching can access the available fonts from the library and
47   perform private matching. The intent is to permit applications to pick and
48   choose appropriate functionality from the library instead of forcing them
49   to choose between this library and a private configuration mechanism. The
50   hope is that this will ensure that configuration of fonts for all
51   applications can be centralized in one place. Centralizing font
52   configuration will simplify and regularize font installation and
53   customization.
54
55  Font Properties
56
57   While font patterns may contain essentially any properties, there are some
58   well known properties with associated types. Fontconfig uses some of these
59   properties for font matching and font completion. Others are provided as a
60   convenience for the applications' rendering mechanism.
61
62     Property        Type    Description
63     --------------------------------------------------------------
64     family          String  Font family names
65     familylang      String  Languages corresponding to each family
66     style           String  Font style. Overrides weight and slant
67     stylelang       String  Languages corresponding to each style
68     fullname        String  Font full names (often includes style)
69     fullnamelang    String  Languages corresponding to each fullname
70     slant           Int     Italic, oblique or roman
71     weight          Int     Light, medium, demibold, bold or black
72     size            Double  Point size
73     width           Int     Condensed, normal or expanded
74     aspect          Double  Stretches glyphs horizontally before hinting
75     pixelsize       Double  Pixel size
76     spacing         Int     Proportional, dual-width, monospace or charcell
77     foundry         String  Font foundry name
78     antialias       Bool    Whether glyphs can be antialiased
79     hinting         Bool    Whether the rasterizer should use hinting
80     hintstyle       Int     Automatic hinting style
81     verticallayout  Bool    Use vertical layout
82     autohint        Bool    Use autohinter instead of normal hinter
83     globaladvance   Bool    Use font global advance data (deprecated)
84     file            String  The filename holding the font
85     index           Int     The index of the font within the file
86     ftface          FT_Face Use the specified FreeType face object
87     rasterizer      String  Which rasterizer is in use
88     outline         Bool    Whether the glyphs are outlines
89     scalable        Bool    Whether glyphs can be scaled
90     scale           Double  Scale factor for point->pixel conversions
91     dpi             Double  Target dots per inch
92     rgba            Int     unknown, rgb, bgr, vrgb, vbgr,
93                             none - subpixel geometry
94     lcdfilter       Int     Type of LCD filter
95     minspace        Bool    Eliminate leading from line spacing
96     charset         CharSet Unicode chars encoded by the font
97     lang            String  List of RFC-3066-style languages this
98                             font supports
99     fontversion     Int     Version number of the font
100     capability      String  List of layout capabilities in the font
101     embolden        Bool    Rasterizer should synthetically embolden the font
102
103
104  Font Matching
105
106   Fontconfig performs matching by measuring the distance from a provided
107   pattern to all of the available fonts in the system. The closest matching
108   font is selected. This ensures that a font will always be returned, but
109   doesn't ensure that it is anything like the requested pattern.
110
111   Font matching starts with an application constructed pattern. The desired
112   attributes of the resulting font are collected together in a pattern. Each
113   property of the pattern can contain one or more values; these are listed
114   in priority order; matches earlier in the list are considered "closer"
115   than matches later in the list.
116
117   The initial pattern is modified by applying the list of editing
118   instructions specific to patterns found in the configuration; each
119   consists of a match predicate and a set of editing operations. They are
120   executed in the order they appeared in the configuration. Each match
121   causes the associated sequence of editing operations to be applied.
122
123   After the pattern has been edited, a sequence of default substitutions are
124   performed to canonicalize the set of available properties; this avoids the
125   need for the lower layers to constantly provide default values for various
126   font properties during rendering.
127
128   The canonical font pattern is finally matched against all available fonts.
129   The distance from the pattern to the font is measured for each of several
130   properties: foundry, charset, family, lang, spacing, pixelsize, style,
131   slant, weight, antialias, rasterizer and outline. This list is in priority
132   order -- results of comparing earlier elements of this list weigh more
133   heavily than later elements.
134
135   There is one special case to this rule; family names are split into two
136   bindings; strong and weak. Strong family names are given greater
137   precedence in the match than lang elements while weak family names are
138   given lower precedence than lang elements. This permits the document
139   language to drive font selection when any document specified font is
140   unavailable.
141
142   The pattern representing that font is augmented to include any properties
143   found in the pattern but not found in the font itself; this permits the
144   application to pass rendering instructions or any other data through the
145   matching system. Finally, the list of editing instructions specific to
146   fonts found in the configuration are applied to the pattern. This modified
147   pattern is returned to the application.
148
149   The return value contains sufficient information to locate and rasterize
150   the font, including the file name, pixel size and other rendering data. As
151   none of the information involved pertains to the FreeType library,
152   applications are free to use any rasterization engine or even to take the
153   identified font file and access it directly.
154
155   The match/edit sequences in the configuration are performed in two passes
156   because there are essentially two different operations necessary -- the
157   first is to modify how fonts are selected; aliasing families and adding
158   suitable defaults. The second is to modify how the selected fonts are
159   rasterized. Those must apply to the selected font, not the original
160   pattern as false matches will often occur.
161
162  Font Names
163
164   Fontconfig provides a textual representation for patterns that the library
165   can both accept and generate. The representation is in three parts, first
166   a list of family names, second a list of point sizes and finally a list of
167   additional properties:
168
169           <families>-<point sizes>:<name1>=<values1>:<name2>=<values2>...
170
171
172   Values in a list are separated with commas. The name needn't include
173   either families or point sizes; they can be elided. In addition, there are
174   symbolic constants that simultaneously indicate both a name and a value.
175   Here are some examples:
176
177     Name                            Meaning
178     ----------------------------------------------------------
179     Times-12                        12 point Times Roman
180     Times-12:bold                   12 point Times Bold
181     Courier:italic                  Courier Italic in the default size
182     Monospace:matrix=1 .1 0 1       The users preferred monospace font
183                                     with artificial obliquing
184
185
186   The '\', '-', ':' and ',' characters in family names must be preceded by a
187   '\' character to avoid having them misinterpreted. Similarly, values
188   containing '\', '=', '_', ':' and ',' must also have them preceded by a
189   '\' character. The '\' characters are stripped out of the family name and
190   values as the font name is read.
191
192Debugging Applications
193
194   To help diagnose font and applications problems, fontconfig is built with
195   a large amount of internal debugging left enabled. It is controlled by
196   means of the FC_DEBUG environment variable. The value of this variable is
197   interpreted as a number, and each bit within that value controls different
198   debugging messages.
199
200     Name         Value    Meaning
201     ---------------------------------------------------------
202     MATCH            1    Brief information about font matching
203     MATCHV           2    Extensive font matching information
204     EDIT             4    Monitor match/test/edit execution
205     FONTSET          8    Track loading of font information at startup
206     CACHE           16    Watch cache files being written
207     CACHEV          32    Extensive cache file writing information
208     PARSE           64    (no longer in use)
209     SCAN           128    Watch font files being scanned to build caches
210     SCANV          256    Verbose font file scanning information
211     MEMORY         512    Monitor fontconfig memory usage
212     CONFIG        1024    Monitor which config files are loaded
213     LANGSET       2048    Dump char sets used to construct lang values
214     OBJTYPES      4096    Display message when value typechecks fail
215
216
217   Add the value of the desired debug levels together and assign that (in
218   base 10) to the FC_DEBUG environment variable before running the
219   application. Output from these statements is sent to stdout.
220
221Lang Tags
222
223   Each font in the database contains a list of languages it supports. This
224   is computed by comparing the Unicode coverage of the font with the
225   orthography of each language. Languages are tagged using an RFC-3066
226   compatible naming and occur in two parts -- the ISO 639 language tag
227   followed a hyphen and then by the ISO 3166 country code. The hyphen and
228   country code may be elided.
229
230   Fontconfig has orthographies for several languages built into the library.
231   No provision has been made for adding new ones aside from rebuilding the
232   library. It currently supports 122 of the 139 languages named in ISO
233   639-1, 141 of the languages with two-letter codes from ISO 639-2 and
234   another 30 languages with only three-letter codes. Languages with both two
235   and three letter codes are provided with only the two letter code.
236
237   For languages used in multiple territories with radically different
238   character sets, fontconfig includes per-territory orthographies. This
239   includes Azerbaijani, Kurdish, Pashto, Tigrinya and Chinese.
240
241Configuration File Format
242
243   Configuration files for fontconfig are stored in XML format; this format
244   makes external configuration tools easier to write and ensures that they
245   will generate syntactically correct configuration files. As XML files are
246   plain text, they can also be manipulated by the expert user using a text
247   editor.
248
249   The fontconfig document type definition resides in the external entity
250   "fonts.dtd"; this is normally stored in the default font configuration
251   directory (/etc/fonts). Each configuration file should contain the
252   following structure:
253
254           <?xml version="1.0"?>
255           <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
256           <fontconfig>
257           ...
258           </fontconfig>
259
260
261  <fontconfig>
262
263   This is the top level element for a font configuration and can contain
264   <dir>, <cachedir>, <include>, <match> and <alias> elements in any order.
265
266  <dir prefix="default">
267
268   This element contains a directory name which will be scanned for font
269   files to include in the set of available fonts. If 'prefix' is set to
270   "xdg", the value in the XDG_DATA_HOME environment variable will be added
271   as the path prefix. please see XDG Base Directory Specification for more
272   details.
273
274  <cachedir prefix="default">
275
276   This element contains a directory name that is supposed to be stored or
277   read the cache of font information. If multiple elements are specified in
278   the configuration file, the directory that can be accessed first in the
279   list will be used to store the cache files. If it starts with '~', it
280   refers to a directory in the users home directory. If 'prefix' is set to
281   "xdg", the value in the XDG_CACHE_HOME environment variable will be added
282   as the path prefix. please see XDG Base Directory Specification for more
283   details. The default directory is ``$XDG_CACHE_HOME/fontconfig'' and it
284   contains the cache files named ``<hash
285   value>-<architecture>.cache-<version'', where <version> is the font
286   configureation file version number (currently 3).
287
288  <include ignore_missing="no" prefix="default">
289
290   This element contains the name of an additional configuration file or
291   directory. If a directory, every file within that directory starting with
292   an ASCII digit (U+0030 - U+0039) and ending with the string ``.conf'' will
293   be processed in sorted order. When the XML datatype is traversed by
294   FcConfigParse, the contents of the file(s) will also be incorporated into
295   the configuration by passing the filename(s) to FcConfigLoadAndParse. If
296   'ignore_missing' is set to "yes" instead of the default "no", a missing
297   file or directory will elicit no warning message from the library. If
298   'prefix' is set to "xdg", the value in the XDG_CONFIG_HOME environment
299   variable will be added as the path prefix. please see XDG Base Directory
300   Specification for more details.
301
302  <config>
303
304   This element provides a place to consolidate additional configuration
305   information. <config> can contain <blank> and <rescan> elements in any
306   order.
307
308  <blank>
309
310   Fonts often include "broken" glyphs which appear in the encoding but are
311   drawn as blanks on the screen. Within the <blank> element, place each
312   Unicode characters which is supposed to be blank in an <int> element.
313   Characters outside of this set which are drawn as blank will be elided
314   from the set of characters supported by the font.
315
316  <rescan>
317
318   The <rescan> element holds an <int> element which indicates the default
319   interval between automatic checks for font configuration changes.
320   Fontconfig will validate all of the configuration files and directories
321   and automatically rebuild the internal datastructures when this interval
322   passes.
323
324  <selectfont>
325
326   This element is used to black/white list fonts from being listed or
327   matched against. It holds acceptfont and rejectfont elements.
328
329  <acceptfont>
330
331   Fonts matched by an acceptfont element are "whitelisted"; such fonts are
332   explicitly included in the set of fonts used to resolve list and match
333   requests; including them in this list protects them from being
334   "blacklisted" by a rejectfont element. Acceptfont elements include glob
335   and pattern elements which are used to match fonts.
336
337  <rejectfont>
338
339   Fonts matched by an rejectfont element are "blacklisted"; such fonts are
340   excluded from the set of fonts used to resolve list and match requests as
341   if they didn't exist in the system. Rejectfont elements include glob and
342   pattern elements which are used to match fonts.
343
344  <glob>
345
346   Glob elements hold shell-style filename matching patterns (including ? and
347   *) which match fonts based on their complete pathnames. This can be used
348   to exclude a set of directories (/usr/share/fonts/uglyfont*), or
349   particular font file types (*.pcf.gz), but the latter mechanism relies
350   rather heavily on filenaming conventions which can't be relied upon. Note
351   that globs only apply to directories, not to individual fonts.
352
353  <pattern>
354
355   Pattern elements perform list-style matching on incoming fonts; that is,
356   they hold a list of elements and associated values. If all of those
357   elements have a matching value, then the pattern matches the font. This
358   can be used to select fonts based on attributes of the font (scalable,
359   bold, etc), which is a more reliable mechanism than using file extensions.
360   Pattern elements include patelt elements.
361
362  <patelt name="property">
363
364   Patelt elements hold a single pattern element and list of values. They
365   must have a 'name' attribute which indicates the pattern element name.
366   Patelt elements include int, double, string, matrix, bool, charset and
367   const elements.
368
369  <match target="pattern">
370
371   This element holds first a (possibly empty) list of <test> elements and
372   then a (possibly empty) list of <edit> elements. Patterns which match all
373   of the tests are subjected to all the edits. If 'target' is set to "font"
374   instead of the default "pattern", then this element applies to the font
375   name resulting from a match rather than a font pattern to be matched. If
376   'target' is set to "scan", then this element applies when the font is
377   scanned to build the fontconfig database.
378
379  <test qual="any" name="property" target="default" compare="eq">
380
381   This element contains a single value which is compared with the target
382   ('pattern', 'font', 'scan' or 'default') property "property" (substitute
383   any of the property names seen above). 'compare' can be one of "eq",
384   "not_eq", "less", "less_eq", "more", "more_eq", "contains" or
385   "not_contains". 'qual' may either be the default, "any", in which case the
386   match succeeds if any value associated with the property matches the test
387   value, or "all", in which case all of the values associated with the
388   property must match the test value. 'ignore-blanks' takes a boolean value.
389   if 'ignore-blanks' is set "true", any blanks in the string will be ignored
390   on its comparison. this takes effects only when compare="eq" or
391   compare="not_eq". When used in a <match target="font"> element, the
392   target= attribute in the <test> element selects between matching the
393   original pattern or the font. "default" selects whichever target the outer
394   <match> element has selected.
395
396  <edit name="property" mode="assign" binding="weak">
397
398   This element contains a list of expression elements (any of the value or
399   operator elements). The expression elements are evaluated at run-time and
400   modify the property "property". The modification depends on whether
401   "property" was matched by one of the associated <test> elements, if so,
402   the modification may affect the first matched value. Any values inserted
403   into the property are given the indicated binding ("strong", "weak" or
404   "same") with "same" binding using the value from the matched pattern
405   element. 'mode' is one of:
406
407     Mode                    With Match              Without Match
408     ---------------------------------------------------------------------
409     "assign"                Replace matching value  Replace all values
410     "assign_replace"        Replace all values      Replace all values
411     "prepend"               Insert before matching  Insert at head of list
412     "prepend_first"         Insert at head of list  Insert at head of list
413     "append"                Append after matching   Append at end of list
414     "append_last"           Append at end of list   Append at end of list
415
416
417  <int>, <double>, <string>, <bool>
418
419   These elements hold a single value of the indicated type. <bool> elements
420   hold either true or false. An important limitation exists in the parsing
421   of floating point numbers -- fontconfig requires that the mantissa start
422   with a digit, not a decimal point, so insert a leading zero for purely
423   fractional values (e.g. use 0.5 instead of .5 and -0.5 instead of -.5).
424
425  <matrix>
426
427   This element holds the four <double> elements of an affine transformation.
428
429  <range>
430
431   This element holds the two <int> elements of a range representation.
432
433  <charset>
434
435   This element holds at least one <int> element of an Unicode code point or
436   more.
437
438  <langset>
439
440   This element holds at least one <string> element of a RFC-3066-style
441   languages or more.
442
443  <name>
444
445   Holds a property name. Evaluates to the first value from the property of
446   the font, not the pattern.
447
448  <const>
449
450   Holds the name of a constant; these are always integers and serve as
451   symbolic names for common font values:
452
453     Constant        Property        Value
454     -------------------------------------
455     thin            weight          0
456     extralight      weight          40
457     ultralight      weight          40
458     light           weight          50
459     book            weight          75
460     regular         weight          80
461     normal          weight          80
462     medium          weight          100
463     demibold        weight          180
464     semibold        weight          180
465     bold            weight          200
466     extrabold       weight          205
467     black           weight          210
468     heavy           weight          210
469     roman           slant           0
470     italic          slant           100
471     oblique         slant           110
472     ultracondensed  width           50
473     extracondensed  width           63
474     condensed       width           75
475     semicondensed   width           87
476     normal          width           100
477     semiexpanded    width           113
478     expanded        width           125
479     extraexpanded   width           150
480     ultraexpanded   width           200
481     proportional    spacing         0
482     dual            spacing         90
483     mono            spacing         100
484     charcell        spacing         110
485     unknown         rgba            0
486     rgb             rgba            1
487     bgr             rgba            2
488     vrgb            rgba            3
489     vbgr            rgba            4
490     none            rgba            5
491     lcdnone         lcdfilter       0
492     lcddefault      lcdfilter       1
493     lcdlight        lcdfilter       2
494     lcdlegacy       lcdfilter       3
495     hintnone        hintstyle       0
496     hintslight      hintstyle       1
497     hintmedium      hintstyle       2
498     hintfull        hintstyle       3
499
500
501  <or>, <and>, <plus>, <minus>, <times>, <divide>
502
503   These elements perform the specified operation on a list of expression
504   elements. <or> and <and> are boolean, not bitwise.
505
506  <eq>, <not_eq>, <less>, <less_eq>, <more>, <more_eq>, <contains>,
507  <not_contains
508
509   These elements compare two values, producing a boolean result.
510
511  <not>
512
513   Inverts the boolean sense of its one expression element
514
515  <if>
516
517   This element takes three expression elements; if the value of the first is
518   true, it produces the value of the second, otherwise it produces the value
519   of the third.
520
521  <alias>
522
523   Alias elements provide a shorthand notation for the set of common match
524   operations needed to substitute one font family for another. They contain
525   a <family> element followed by optional <prefer>, <accept> and <default>
526   elements. Fonts matching the <family> element are edited to prepend the
527   list of <prefer>ed families before the matching <family>, append the
528   <accept>able families after the matching <family> and append the <default>
529   families to the end of the family list.
530
531  <family>
532
533   Holds a single font family name
534
535  <prefer>, <accept>, <default>
536
537   These hold a list of <family> elements to be used by the <alias> element.
538
539EXAMPLE CONFIGURATION FILE
540
541  System configuration file
542
543   This is an example of a system-wide configuration file
544
545<?xml version="1.0"?>
546<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
547<!-- /etc/fonts/fonts.conf file to configure system font access -->
548<fontconfig>
549<!--
550        Find fonts in these directories
551-->
552<dir>/usr/share/fonts</dir>
553<dir>/usr/X11R6/lib/X11/fonts</dir>
554
555<!--
556        Accept deprecated 'mono' alias, replacing it with 'monospace'
557-->
558<match target="pattern">
559        <test qual="any" name="family"><string>mono</string></test>
560        <edit name="family" mode="assign"><string>monospace</string></edit>
561</match>
562
563<!--
564        Names not including any well known alias are given 'sans-serif'
565-->
566<match target="pattern">
567        <test qual="all" name="family" mode="not_eq"><string>sans-serif</string></test>
568        <test qual="all" name="family" mode="not_eq"><string>serif</string></test>
569        <test qual="all" name="family" mode="not_eq"><string>monospace</string></test>
570        <edit name="family" mode="append_last"><string>sans-serif</string></edit>
571</match>
572
573<!--
574        Load per-user customization file, but don't complain
575        if it doesn't exist
576-->
577<include ignore_missing="yes" prefix="xdg">fontconfig/fonts.conf</include>
578
579<!--
580        Load local customization files, but don't complain
581        if there aren't any
582-->
583<include ignore_missing="yes">conf.d</include>
584<include ignore_missing="yes">local.conf</include>
585
586<!--
587        Alias well known font names to available TrueType fonts.
588        These substitute TrueType faces for similar Type1
589        faces to improve screen appearance.
590-->
591<alias>
592        <family>Times</family>
593        <prefer><family>Times New Roman</family></prefer>
594        <default><family>serif</family></default>
595</alias>
596<alias>
597        <family>Helvetica</family>
598        <prefer><family>Arial</family></prefer>
599        <default><family>sans</family></default>
600</alias>
601<alias>
602        <family>Courier</family>
603        <prefer><family>Courier New</family></prefer>
604        <default><family>monospace</family></default>
605</alias>
606
607<!--
608        Provide required aliases for standard names
609        Do these after the users configuration file so that
610        any aliases there are used preferentially
611-->
612<alias>
613        <family>serif</family>
614        <prefer><family>Times New Roman</family></prefer>
615</alias>
616<alias>
617        <family>sans</family>
618        <prefer><family>Arial</family></prefer>
619</alias>
620<alias>
621        <family>monospace</family>
622        <prefer><family>Andale Mono</family></prefer>
623</alias>
624
625<--
626        The example of the requirements of OR operator;
627        If the 'family' contains 'Courier New' OR 'Courier'
628        add 'monospace' as the alternative
629-->
630<match target="pattern">
631        <test name="family" mode="eq">
632                <string>Courier New</string>
633        </test>
634        <edit name="family" mode="prepend">
635                <string>monospace</string>
636        </edit>
637</match>
638<match target="pattern">
639        <test name="family" mode="eq">
640                <string>Courier</string>
641        </test>
642        <edit name="family" mode="prepend">
643                <string>monospace</string>
644        </edit>
645</match>
646
647</fontconfig>
648
649
650  User configuration file
651
652   This is an example of a per-user configuration file that lives in
653   $XDG_CONFIG_HOME/fontconfig/fonts.conf
654
655 <?xml version="1.0"?>
656 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
657 <!-- $XDG_CONFIG_HOME/fontconfig/fonts.conf for per-user font configuration -->
658 <fontconfig>
659
660 <!--
661         Private font directory
662 -->
663 <dir prefix="xdg">fonts</dir>
664
665 <!--
666         use rgb sub-pixel ordering to improve glyph appearance on
667         LCD screens.  Changes affecting rendering, but not matching
668         should always use target="font".
669 -->
670 <match target="font">
671         <edit name="rgba" mode="assign"><const>rgb</const></edit>
672 </match>
673 <!--
674         use WenQuanYi Zen Hei font when serif is requested for Chinese
675 -->
676 <match>
677         <!--
678                 If you don't want to use WenQuanYi Zen Hei font for zh-tw etc,
679                 you can use zh-cn instead of zh.
680                 Please note, even if you set zh-cn, it still matches zh.
681                 if you don't like it, you can use compare="eq"
682                 instead of compare="contains".
683         -->
684         <test name="lang" compare="contains">
685                 <string>zh</string>
686         </test>
687         <test name="family">
688                 <string>serif</string>
689         </test>
690         <edit name="family" mode="prepend">
691                 <string>WenQuanYi Zen Hei</string>
692         </edit>
693 </match>
694 <!--
695         use VL Gothic font when sans-serif is requested for Japanese
696 -->
697 <match>
698         <test name="lang" compare="contains">
699                 <string>ja</string>
700         </test>
701         <test name="family">
702                 <string>sans-serif</string>
703         </test>
704         <edit name="family" mode="prepend">
705                 <string>VL Gothic</string>
706         </edit>
707 </match>
708 </fontconfig>
709
710
711Files
712
713   fonts.conf contains configuration information for the fontconfig library
714   consisting of directories to look at for font information as well as
715   instructions on editing program specified font patterns before attempting
716   to match the available fonts. It is in XML format.
717
718   conf.d is the conventional name for a directory of additional
719   configuration files managed by external applications or the local
720   administrator. The filenames starting with decimal digits are sorted in
721   lexicographic order and used as additional configuration files. All of
722   these files are in XML format. The master fonts.conf file references this
723   directory in an <include> directive.
724
725   fonts.dtd is a DTD that describes the format of the configuration files.
726
727   $XDG_CONFIG_HOME/fontconfig/conf.d and ~/.fonts.conf.d is the conventional
728   name for a per-user directory of (typically auto-generated) configuration
729   files, although the actual location is specified in the global fonts.conf
730   file. please note that ~/.fonts.conf.d is deprecated now. it will not be
731   read by default in the future version.
732
733   $XDG_CONFIG_HOME/fontconfig/fonts.conf and ~/.fonts.conf is the
734   conventional location for per-user font configuration, although the actual
735   location is specified in the global fonts.conf file. please note that
736   ~/.fonts.conf is deprecated now. it will not be read by default in the
737   future version.
738
739   $XDG_CACHE_HOME/fontconfig/*.cache-* and ~/.fontconfig/*.cache-* is the
740   conventional repository of font information that isn't found in the
741   per-directory caches. This file is automatically maintained by fontconfig.
742   please note that ~/.fontconfig/*.cache-* is deprecated now. it will not be
743   read by default in the future version.
744
745Environment variables
746
747   FONTCONFIG_FILE is used to override the default configuration file.
748
749   FONTCONFIG_PATH is used to override the default configuration directory.
750
751   FC_DEBUG is used to output the detailed debugging messages. see
752   [1]Debugging Applications section for more details.
753
754   FONTCONFIG_USE_MMAP is used to control the use of mmap(2) for the cache
755   files if available. this take a boolean value. fontconfig will checks if
756   the cache files are stored on the filesystem that is safe to use mmap(2).
757   explicitly setting this environment variable will causes skipping this
758   check and enforce to use or not use mmap(2) anyway.
759
760See Also
761
762   fc-cat(1), fc-cache(1), fc-list(1), fc-match(1), fc-query(1)
763
764Version
765
766   Fontconfig version 2.10.2
767
768References
769
770   Visible links
771   1. file:///tmp/html-aDEwSV#DEBUG
772