1FONTS-CONF(5)                                                    FONTS-CONF(5)
2
3
4

NAME

6       fonts.conf - Font configuration files
7

SYNOPSIS

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
17

DESCRIPTION

19       Fontconfig is a library designed to provide system-wide font configura‐
20       tion, customization and application access.
21

FUNCTIONAL OVERVIEW

23       Fontconfig contains two essential  modules,  the  configuration  module
24       which  builds an internal configuration from XML files and the matching
25       module which accepts font patterns and  returns  the  nearest  matching
26       font.
27
28   FONT CONFIGURATION
29       The  configuration  module  consists of the FcConfig datatype, libexpat
30       and FcConfigParse which walks over an XML tree and amends a  configura‐
31       tion  with  data found within. From an external perspective, configura‐
32       tion of the library consists of generating a valid XML tree and feeding
33       that  to  FcConfigParse.  The only other mechanism provided to applica‐
34       tions for changing the running configuration is to add fonts and direc‐
35       tories to the list of application-provided font files.
36
37       The intent is to make font configurations relatively static, and shared
38       by as many applications as possible. It is hoped that this will lead to
39       more  stable  font selection when passing names from one application to
40       another.  XML was chosen as a configuration file format because it pro‐
41       vides  a format which is easy for external agents to edit while retain‐
42       ing the correct structure and syntax.
43
44       Font configuration is separate from font matching; applications needing
45       to  do  their  own  matching  can  access  the available fonts from the
46       library and perform private matching. The intent is to permit  applica‐
47       tions  to  pick  and  choose appropriate functionality from the library
48       instead of forcing them to choose between this library  and  a  private
49       configuration mechanism. The hope is that this will ensure that config‐
50       uration of fonts for all applications can be centralized in one  place.
51       Centralizing  font  configuration  will  simplify  and  regularize font
52       installation and customization.
53
54   FONT PROPERTIES
55       While font patterns may contain essentially any properties,  there  are
56       some  well known properties with associated types. Fontconfig uses some
57       of these properties for font matching and font completion.  Others  are
58       provided as a convenience for the applications' rendering mechanism.
59
60         Property        Type    Description
61         --------------------------------------------------------------
62         family          String  Font family names
63         familylang      String  Languages corresponding to each family
64         style           String  Font style. Overrides weight and slant
65         stylelang       String  Languages corresponding to each style
66         fullname        String  Font full names (often includes style)
67         fullnamelang    String  Languages corresponding to each fullname
68         slant           Int     Italic, oblique or roman
69         weight          Int     Light, medium, demibold, bold or black
70         size            Double  Point size
71         width           Int     Condensed, normal or expanded
72         aspect          Double  Stretches glyphs horizontally before hinting
73         pixelsize       Double  Pixel size
74         spacing         Int     Proportional, dual-width, monospace or charcell
75         foundry         String  Font foundry name
76         antialias       Bool    Whether glyphs can be antialiased
77         hinting         Bool    Whether the rasterizer should use hinting
78         hintstyle       Int     Automatic hinting style
79         verticallayout  Bool    Use vertical layout
80         autohint        Bool    Use autohinter instead of normal hinter
81         globaladvance   Bool    Use font global advance data (deprecated)
82         file            String  The filename holding the font
83         index           Int     The index of the font within the file
84         ftface          FT_Face Use the specified FreeType face object
85         rasterizer      String  Which rasterizer is in use (deprecated)
86         outline         Bool    Whether the glyphs are outlines
87         scalable        Bool    Whether glyphs can be scaled
88         color           Bool    Whether any glyphs have color
89         scale           Double  Scale factor for point->pixel conversions (deprecated)
90         dpi             Double  Target dots per inch
91         rgba            Int     unknown, rgb, bgr, vrgb, vbgr,
92                                 none - subpixel geometry
93         lcdfilter       Int     Type of LCD filter
94         minspace        Bool    Eliminate leading from line spacing
95         charset         CharSet Unicode chars encoded by the font
96         lang            String  List of RFC-3066-style languages this
97                                 font supports
98         fontversion     Int     Version number of the font
99         capability      String  List of layout capabilities in the font
100         fontformat      String  String name of the font format
101         embolden        Bool    Rasterizer should synthetically embolden the font
102         embeddedbitmap  Bool    Use the embedded bitmap instead of the outline
103         decorative      Bool    Whether the style is a decorative variant
104         fontfeatures    String  List of the feature tags in OpenType to be enabled
105         namelang        String  Language name to be used for the default value of
106                                 familylang, stylelang, and fullnamelang
107         prgname         String  String  Name of the running program
108         postscriptname  String  Font family name in PostScript
109
110
111
112   FONT MATCHING
113       Fontconfig  performs matching by measuring the distance from a provided
114       pattern to all of the available fonts in the system. The closest match‐
115       ing font is selected. This ensures that a font will always be returned,
116       but doesn't ensure that it is anything like the requested pattern.
117
118       Font matching starts  with  an  application  constructed  pattern.  The
119       desired  attributes  of  the resulting font are collected together in a
120       pattern. Each property of the pattern can contain one or  more  values;
121       these  are  listed  in  priority order; matches earlier in the list are
122       considered "closer" than matches later in the list.
123
124       The initial pattern  is  modified  by  applying  the  list  of  editing
125       instructions specific to patterns found in the configuration; each con‐
126       sists of a match predicate and a set of editing  operations.  They  are
127       executed  in  the  order they appeared in the configuration. Each match
128       causes the associated sequence of editing operations to be applied.
129
130       After the pattern has been edited, a sequence of default  substitutions
131       are  performed  to  canonicalize  the set of available properties; this
132       avoids the need for the lower layers to constantly provide default val‐
133       ues for various font properties during rendering.
134
135       The  canonical  font  pattern  is finally matched against all available
136       fonts.  The distance from the pattern to the font is measured for  each
137       of  several properties: foundry, charset, family, lang, spacing, pixel‐
138       size, style, slant, weight, antialias,  rasterizer  and  outline.  This
139       list  is  in priority order -- results of comparing earlier elements of
140       this list weigh more heavily than later elements.
141
142       There is one special case to this rule; family names are split into two
143       bindings; strong and weak. Strong family names are given greater prece‐
144       dence in the match than lang elements while weak family names are given
145       lower precedence than lang elements. This permits the document language
146       to drive font selection when any document specified  font  is  unavail‐
147       able.
148
149       The  pattern representing that font is augmented to include any proper‐
150       ties found in the pattern but not found in the font itself;  this  per‐
151       mits  the  application to pass rendering instructions or any other data
152       through the matching system. Finally, the list of editing  instructions
153       specific  to  fonts  found in the configuration are applied to the pat‐
154       tern. This modified pattern is returned to the application.
155
156       The return value contains sufficient information to locate and  raster‐
157       ize  the  font, including the file name, pixel size and other rendering
158       data. As none of the information  involved  pertains  to  the  FreeType
159       library,  applications are free to use any rasterization engine or even
160       to take the identified font file and access it directly.
161
162       The match/edit sequences in the  configuration  are  performed  in  two
163       passes because there are essentially two different operations necessary
164       -- the first is to modify how fonts are selected; aliasing families and
165       adding  suitable  defaults.  The  second  is to modify how the selected
166       fonts are rasterized. Those must apply to the selected  font,  not  the
167       original pattern as false matches will often occur.
168
169   FONT NAMES
170       Fontconfig  provides  a  textual  representation  for patterns that the
171       library can both accept and generate. The representation  is  in  three
172       parts,  first  a list of family names, second a list of point sizes and
173       finally a list of additional properties:
174
175            <families>-<point sizes>:<name1>=<values1>:<name2>=<values2>...
176
177
178
179       Values in a list are separated with commas. The  name  needn't  include
180       either  families or point sizes; they can be elided. In addition, there
181       are symbolic constants that simultaneously indicate both a name  and  a
182       value.  Here are some examples:
183
184         Name                            Meaning
185         ----------------------------------------------------------
186         Times-12                        12 point Times Roman
187         Times-12:bold                   12 point Times Bold
188         Courier:italic                  Courier Italic in the default size
189         Monospace:matrix=1 .1 0 1       The users preferred monospace font
190                                         with artificial obliquing
191
192
193
194       The  '\',  '-', ':' and ',' characters in family names must be preceded
195       by a '\' character to avoid having them misinterpreted. Similarly, val‐
196       ues  containing '\', '=', '_', ':' and ',' must also have them preceded
197       by a '\' character. The '\' characters are stripped out of  the  family
198       name and values as the font name is read.
199

DEBUGGING APPLICATIONS

201       To  help  diagnose  font and applications problems, fontconfig is built
202       with a large amount of internal debugging  left  enabled.  It  is  con‐
203       trolled  by  means  of  the FC_DEBUG environment variable. The value of
204       this variable is interpreted as a number,  and  each  bit  within  that
205       value controls different debugging messages.
206
207         Name         Value    Meaning
208         ---------------------------------------------------------
209         MATCH            1    Brief information about font matching
210         MATCHV           2    Extensive font matching information
211         EDIT             4    Monitor match/test/edit execution
212         FONTSET          8    Track loading of font information at startup
213         CACHE           16    Watch cache files being written
214         CACHEV          32    Extensive cache file writing information
215         PARSE           64    (no longer in use)
216         SCAN           128    Watch font files being scanned to build caches
217         SCANV          256    Verbose font file scanning information
218         MEMORY         512    Monitor fontconfig memory usage
219         CONFIG        1024    Monitor which config files are loaded
220         LANGSET       2048    Dump char sets used to construct lang values
221         MATCH2        4096    Display font-matching transformation in patterns
222
223
224
225       Add  the value of the desired debug levels together and assign that (in
226       base 10) to the FC_DEBUG environment variable before running the appli‐
227       cation. Output from these statements is sent to stdout.
228

LANG TAGS

230       Each  font  in  the  database contains a list of languages it supports.
231       This is computed by comparing the Unicode coverage of the font with the
232       orthography  of  each  language. Languages are tagged using an RFC-3066
233       compatible naming and occur in two parts -- the ISO  639  language  tag
234       followed a hyphen and then by the ISO 3166 country code. The hyphen and
235       country code may be elided.
236
237       Fontconfig has orthographies  for  several  languages  built  into  the
238       library.   No  provision  has  been made for adding new ones aside from
239       rebuilding the library. It currently supports 122 of the 139  languages
240       named in ISO 639-1, 141 of the languages with two-letter codes from ISO
241       639-2 and another 30 languages with only three-letter codes.  Languages
242       with  both  two  and  three letter codes are provided with only the two
243       letter code.
244
245       For languages used in multiple  territories  with  radically  different
246       character  sets,  fontconfig includes per-territory orthographies. This
247       includes Azerbaijani, Kurdish, Pashto, Tigrinya and Chinese.
248

CONFIGURATION FILE FORMAT

250       Configuration files for fontconfig are stored in XML format; this  for‐
251       mat makes external configuration tools easier to write and ensures that
252       they will generate syntactically correct configuration  files.  As  XML
253       files  are  plain text, they can also be manipulated by the expert user
254       using a text editor.
255
256       The fontconfig document type definition resides in the external  entity
257       "fonts.dtd";  this is normally stored in the default font configuration
258       directory (/etc/fonts). Each configuration file should contain the fol‐
259       lowing structure:
260
261            <?xml version="1.0"?>
262            <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
263            <fontconfig>
264       ...
265            </fontconfig>
266
267
268
269   <FONTCONFIG>
270       This  is the top level element for a font configuration and can contain
271       <dir>, <cachedir>, <include>,  <match>  and  <alias>  elements  in  any
272       order.
273
274   <DIR PREFIX="DEFAULT">
275       This  element  contains a directory name which will be scanned for font
276       files to include in the set of available fonts. If 'prefix' is  set  to
277       "xdg",  the  value  in  the  XDG_DATA_HOME environment variable will be
278       added as the path prefix. please see XDG Base  Directory  Specification
279       for more details.
280
281   <CACHEDIR PREFIX="DEFAULT">
282       This element contains a directory name that is supposed to be stored or
283       read the cache of font information. If multiple elements are  specified
284       in  the configuration file, the directory that can be accessed first in
285       the list will be used to store the cache files. If it starts with  '~',
286       it  refers  to  a directory in the users home directory. If 'prefix' is
287       set to "xdg", the value in the XDG_CACHE_HOME environment variable will
288       be  added  as the path prefix. please see XDG Base Directory Specifica‐
289       tion    for    more    details.     The    default     directory     is
290       ``$XDG_CACHE_HOME/fontconfig''  and  it  contains the cache files named
291       ``<hash value>-<architecture>.cache-<version>'', where <version> is the
292       fontconfig cache file version number (currently 7).
293
294   <INCLUDE IGNORE_MISSING="NO" PREFIX="DEFAULT">
295       This  element  contains the name of an additional configuration file or
296       directory. If a directory, every file within  that  directory  starting
297       with  an  ASCII  digit  (U+0030  -  U+0039)  and ending with the string
298       ``.conf'' will be processed in sorted order. When the XML  datatype  is
299       traversed  by  FcConfigParse,  the contents of the file(s) will also be
300       incorporated into the  configuration  by  passing  the  filename(s)  to
301       FcConfigLoadAndParse.  If  'ignore_missing'  is set to "yes" instead of
302       the default "no", a missing file or directory will  elicit  no  warning
303       message from the library. If 'prefix' is set to "xdg", the value in the
304       XDG_CONFIG_HOME environment variable will be added as the path  prefix.
305       please see XDG Base Directory Specification for more details.
306
307   <CONFIG>
308       This  element  provides a place to consolidate additional configuration
309       information. <config> can contain <blank> and <rescan> elements in  any
310       order.
311
312   <BLANK>
313       Fonts  often  include  "broken" glyphs which appear in the encoding but
314       are drawn as blanks on the screen. Within the  <blank>  element,  place
315       each  Unicode characters which is supposed to be blank in an <int> ele‐
316       ment.  Characters outside of this set which are drawn as blank will  be
317       elided from the set of characters supported by the font.
318
319   <RESCAN>
320       The <rescan> element holds an <int> element which indicates the default
321       interval between  automatic  checks  for  font  configuration  changes.
322       Fontconfig will validate all of the configuration files and directories
323       and automatically rebuild the internal datastructures when this  inter‐
324       val passes.
325
326   <SELECTFONT>
327       This  element  is  used  to black/white list fonts from being listed or
328       matched against. It holds acceptfont and rejectfont elements.
329
330   <ACCEPTFONT>
331       Fonts matched by an acceptfont element are  "whitelisted";  such  fonts
332       are  explicitly  included  in the set of fonts used to resolve list and
333       match 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       Fonts matched by an rejectfont element are  "blacklisted";  such  fonts
339       are  excluded  from  the  set  of  fonts used to resolve list and match
340       requests as if they didn't exist in  the  system.  Rejectfont  elements
341       include glob and pattern elements which are used to match fonts.
342
343   <GLOB>
344       Glob  elements hold shell-style filename matching patterns (including ?
345       and *) which match fonts based on their complete pathnames. This can be
346       used  to  exclude a set of directories (/usr/share/fonts/uglyfont*), or
347       particular font file types (*.pcf.gz), but the latter mechanism  relies
348       rather  heavily  on  filenaming conventions which can't be relied upon.
349       Note that globs only apply to directories, not to individual fonts.
350
351   <PATTERN>
352       Pattern elements perform list-style matching on  incoming  fonts;  that
353       is, they hold a list of elements and associated values. If all of those
354       elements have a matching value, then the pattern matches the font. This
355       can  be used to select fonts based on attributes of the font (scalable,
356       bold, etc), which is a more reliable mechanism than using  file  exten‐
357       sions.  Pattern elements include patelt elements.
358
359   <PATELT NAME="PROPERTY">
360       Patelt  elements hold a single pattern element and list of values. They
361       must have a 'name' attribute which indicates the pattern element  name.
362       Patelt  elements include int, double, string, matrix, bool, charset and
363       const elements.
364
365   <MATCH TARGET="PATTERN">
366       This element holds first a (possibly empty) list of <test> elements and
367       then  a  (possibly empty) list of <edit> elements. Patterns which match
368       all of the tests are subjected to all the edits. If 'target' is set  to
369       "font"  instead  of the default "pattern", then this element applies to
370       the font name resulting from a match rather than a font pattern  to  be
371       matched.  If  'target' is set to "scan", then this element applies when
372       the font is scanned to build the fontconfig database.
373
374   <TEST QUAL="ANY" NAME="PROPERTY" TARGET="DEFAULT" COMPARE="EQ">
375       This element contains a single value which is compared with the  target
376       ('pattern',  'font',  'scan' or 'default') property "property" (substi‐
377       tute any of the property names seen above). 'compare'  can  be  one  of
378       "eq",  "not_eq",  "less",  "less_eq",  "more", "more_eq", "contains" or
379       "not_contains". 'qual' may either be the default, "any", in which  case
380       the  match  succeeds  if any value associated with the property matches
381       the test value, or "all", in which case all of  the  values  associated
382       with  the  property  must match the test value. 'ignore-blanks' takes a
383       boolean value. if 'ignore-blanks' is set  "true",  any  blanks  in  the
384       string  will be ignored on its comparison. this takes effects only when
385       compare="eq" or compare="not_eq".  When used in a <match target="font">
386       element,  the  target=  attribute in the <test> element selects between
387       matching the original pattern or the font. "default" selects  whichever
388       target the outer <match> element has selected.
389
390   <EDIT NAME="PROPERTY" MODE="ASSIGN" BINDING="WEAK">
391       This  element  contains a list of expression elements (any of the value
392       or operator elements). The expression elements are  evaluated  at  run-
393       time  and  modify  the property "property". The modification depends on
394       whether "property" was matched by one of  the  associated  <test>  ele‐
395       ments,  if so, the modification may affect the first matched value. Any
396       values inserted into the  property  are  given  the  indicated  binding
397       ("strong",  "weak"  or "same") with "same" binding using the value from
398       the matched pattern element.  'mode' is one of:
399
400         Mode                    With Match              Without Match
401         ---------------------------------------------------------------------
402         "assign"                Replace matching value  Replace all values
403         "assign_replace"        Replace all values      Replace all values
404         "prepend"               Insert before matching  Insert at head of list
405         "prepend_first"         Insert at head of list  Insert at head of list
406         "append"                Append after matching   Append at end of list
407         "append_last"           Append at end of list   Append at end of list
408         "delete"                Delete matching value   Delete all values
409         "delete_all"            Delete all values       Delete all values
410
411
412
413   <INT>, <DOUBLE>, <STRING>, <BOOL>
414       These elements hold a single value of the indicated type.  <bool>  ele‐
415       ments  hold either true or false. An important limitation exists in the
416       parsing of floating point numbers -- fontconfig requires that the  man‐
417       tissa start with a digit, not a decimal point, so insert a leading zero
418       for purely fractional values (e.g. use  0.5  instead  of  .5  and  -0.5
419       instead of -.5).
420
421   <MATRIX>
422       This  element holds four numerical expressions of an affine transforma‐
423       tion.  At their simplest these will be four <double> elements but  they
424       can also be more involved expressions.
425
426   <RANGE>
427       This element holds the two <int> elements of a range representation.
428
429   <CHARSET>
430       This  element holds at least one <int> element of an Unicode code point
431       or more.
432
433   <LANGSET>
434       This element holds at least one <string> element  of  a  RFC-3066-style
435       languages or more.
436
437   <NAME>
438       Holds  a  property name. Evaluates to the first value from the property
439       of the pattern. If the 'target'  attribute  is  not  present,  it  will
440       default  to  'default', in which case the property is returned from the
441       font pattern during a target="font" match, and to the pattern during  a
442       target="pattern"  match.  The attribute can also take the values 'font'
443       or 'pattern' to explicitly choose which pattern to use. It is an  error
444       to use a target of 'font' in a match that has target="pattern".
445
446   <CONST>
447       Holds  the  name  of a constant; these are always integers and serve as
448       symbolic names for common font values:
449
450         Constant        Property        Value
451         -------------------------------------
452         thin            weight          0
453         extralight      weight          40
454         ultralight      weight          40
455         light           weight          50
456         demilight       weight          55
457         semilight       weight          55
458         book            weight          75
459         regular         weight          80
460         normal          weight          80
461         medium          weight          100
462         demibold        weight          180
463         semibold        weight          180
464         bold            weight          200
465         extrabold       weight          205
466         black           weight          210
467         heavy           weight          210
468         roman           slant           0
469         italic          slant           100
470         oblique         slant           110
471         ultracondensed  width           50
472         extracondensed  width           63
473         condensed       width           75
474         semicondensed   width           87
475         normal          width           100
476         semiexpanded    width           113
477         expanded        width           125
478         extraexpanded   width           150
479         ultraexpanded   width           200
480         proportional    spacing         0
481         dual            spacing         90
482         mono            spacing         100
483         charcell        spacing         110
484         unknown         rgba            0
485         rgb             rgba            1
486         bgr             rgba            2
487         vrgb            rgba            3
488         vbgr            rgba            4
489         none            rgba            5
490         lcdnone         lcdfilter       0
491         lcddefault      lcdfilter       1
492         lcdlight        lcdfilter       2
493         lcdlegacy       lcdfilter       3
494         hintnone        hintstyle       0
495         hintslight      hintstyle       1
496         hintmedium      hintstyle       2
497         hintfull        hintstyle       3
498
499
500
501   <OR>, <AND>, <PLUS>, <MINUS>, <TIMES>, <DIVIDE>
502       These elements perform the specified operation on a list of  expression
503       elements. <or> and <and> are boolean, not bitwise.
504
505   <EQ>, <NOT_EQ>, <LESS>, <LESS_EQ>, <MORE>, <MORE_EQ>, <CONTAINS>, <NOT_CON‐
506       TAINS
507       These elements compare two values, producing a boolean result.
508
509   <NOT>
510       Inverts the boolean sense of its one expression element
511
512   <IF>
513       This element takes three expression elements; if the value of the first
514       is true, it produces the value of the second, otherwise it produces the
515       value of the third.
516
517   <ALIAS>
518       Alias elements provide a shorthand notation for the set of common match
519       operations  needed to substitute one font family for another. They con‐
520       tain a <family> element followed by  optional  <prefer>,  <accept>  and
521       <default>  elements.  Fonts matching the <family> element are edited to
522       prepend the list of <prefer>ed families before the  matching  <family>,
523       append the <accept>able families after the matching <family> and append
524       the <default> families to the end of the family list.
525
526   <FAMILY>
527       Holds a single font family name
528
529   <PREFER>, <ACCEPT>, <DEFAULT>
530       These hold a list of <family> elements to be used by the  <alias>  ele‐
531       ment.
532

EXAMPLE CONFIGURATION FILE

534   SYSTEM CONFIGURATION FILE
535       This is an example of a system-wide configuration file
536
537       <?xml version="1.0"?>
538       <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
539       <!-- /etc/fonts/fonts.conf file to configure system font access -->
540       <fontconfig>
541       <!--
542            Find fonts in these directories
543       -->
544       <dir>/usr/share/fonts</dir>
545       <dir>/usr/X11R6/lib/X11/fonts</dir>
546
547       <!--
548            Accept deprecated 'mono' alias, replacing it with 'monospace'
549       -->
550       <match target="pattern">
551            <test qual="any" name="family"><string>mono</string></test>
552            <edit name="family" mode="assign"><string>monospace</string></edit>
553       </match>
554
555       <!--
556            Names not including any well known alias are given 'sans-serif'
557       -->
558       <match target="pattern">
559            <test qual="all" name="family" mode="not_eq"><string>sans-serif</string></test>
560            <test qual="all" name="family" mode="not_eq"><string>serif</string></test>
561            <test qual="all" name="family" mode="not_eq"><string>monospace</string></test>
562            <edit name="family" mode="append_last"><string>sans-serif</string></edit>
563       </match>
564
565       <!--
566            Load per-user customization file, but don't complain
567            if it doesn't exist
568       -->
569       <include ignore_missing="yes" prefix="xdg">fontconfig/fonts.conf</include>
570
571       <!--
572            Load local customization files, but don't complain
573            if there aren't any
574       -->
575       <include ignore_missing="yes">conf.d</include>
576       <include ignore_missing="yes">local.conf</include>
577
578       <!--
579            Alias well known font names to available TrueType fonts.
580            These substitute TrueType faces for similar Type1
581            faces to improve screen appearance.
582       -->
583       <alias>
584            <family>Times</family>
585            <prefer><family>Times New Roman</family></prefer>
586            <default><family>serif</family></default>
587       </alias>
588       <alias>
589            <family>Helvetica</family>
590            <prefer><family>Arial</family></prefer>
591            <default><family>sans</family></default>
592       </alias>
593       <alias>
594            <family>Courier</family>
595            <prefer><family>Courier New</family></prefer>
596            <default><family>monospace</family></default>
597       </alias>
598
599       <!--
600            Provide required aliases for standard names
601            Do these after the users configuration file so that
602            any aliases there are used preferentially
603       -->
604       <alias>
605            <family>serif</family>
606            <prefer><family>Times New Roman</family></prefer>
607       </alias>
608       <alias>
609            <family>sans</family>
610            <prefer><family>Arial</family></prefer>
611       </alias>
612       <alias>
613            <family>monospace</family>
614            <prefer><family>Andale Mono</family></prefer>
615       </alias>
616
617       <--
618            The example of the requirements of OR operator;
619            If the 'family' contains 'Courier New' OR 'Courier'
620            add 'monospace' as the alternative
621       -->
622       <match target="pattern">
623            <test name="family" mode="eq">
624                 <string>Courier New</string>
625            </test>
626            <edit name="family" mode="prepend">
627                 <string>monospace</string>
628            </edit>
629       </match>
630       <match target="pattern">
631            <test name="family" mode="eq">
632                 <string>Courier</string>
633            </test>
634            <edit name="family" mode="prepend">
635                 <string>monospace</string>
636            </edit>
637       </match>
638
639       </fontconfig>
640
641
642
643   USER CONFIGURATION FILE
644       This  is  an  example  of  a  per-user configuration file that lives in
645       $XDG_CONFIG_HOME/fontconfig/fonts.conf
646
647       <?xml version="1.0"?>
648       <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
649       <!-- $XDG_CONFIG_HOME/fontconfig/fonts.conf for per-user font configuration -->
650       <fontconfig>
651
652       <!--
653            Private font directory
654       -->
655       <dir prefix="xdg">fonts</dir>
656
657       <!--
658            use rgb sub-pixel ordering to improve glyph appearance on
659            LCD screens.  Changes affecting rendering, but not matching
660            should always use target="font".
661       -->
662       <match target="font">
663            <edit name="rgba" mode="assign"><const>rgb</const></edit>
664       </match>
665       <!--
666            use WenQuanYi Zen Hei font when serif is requested for Chinese
667       -->
668       <match>
669            <!--
670                 If you don't want to use WenQuanYi Zen Hei font for zh-tw etc,
671                 you can use zh-cn instead of zh.
672                 Please note, even if you set zh-cn, it still matches zh.
673                 if you don't like it, you can use compare="eq"
674                 instead of compare="contains".
675            -->
676            <test name="lang" compare="contains">
677                 <string>zh</string>
678            </test>
679            <test name="family">
680                 <string>serif</string>
681            </test>
682            <edit name="family" mode="prepend">
683                 <string>WenQuanYi Zen Hei</string>
684            </edit>
685       </match>
686       <!--
687            use VL Gothic font when sans-serif is requested for Japanese
688       -->
689       <match>
690            <test name="lang" compare="contains">
691                 <string>ja</string>
692            </test>
693            <test name="family">
694                 <string>sans-serif</string>
695            </test>
696            <edit name="family" mode="prepend">
697                 <string>VL Gothic</string>
698            </edit>
699       </match>
700       </fontconfig>
701
702
703

FILES

705       fonts.conf  contains  configuration  information  for  the   fontconfig
706       library  consisting  of  directories to look at for font information as
707       well as instructions on editing program specified font patterns  before
708       attempting to match the available fonts. It is in XML format.
709
710       conf.d  is the conventional name for a directory of additional configu‐
711       ration files managed by external applications or the local  administra‐
712       tor.  The  filenames starting with decimal digits are sorted in lexico‐
713       graphic order and used as additional configuration files. All of  these
714       files  are  in  XML  format. The master fonts.conf file references this
715       directory in an <include> directive.
716
717       fonts.dtd is a DTD that  describes  the  format  of  the  configuration
718       files.
719
720       $XDG_CONFIG_HOME/fontconfig/conf.d  and  ~/.fonts.conf.d is the conven‐
721       tional name for a per-user directory of (typically auto-generated) con‐
722       figuration  files,  although  the  actual  location is specified in the
723       global fonts.conf file. please note that ~/.fonts.conf.d is  deprecated
724       now. it will not be read by default in the future version.
725
726       $XDG_CONFIG_HOME/fontconfig/fonts.conf and ~/.fonts.conf is the conven‐
727       tional location for per-user font configuration,  although  the  actual
728       location  is  specified in the global fonts.conf file. please note that
729       ~/.fonts.conf is deprecated now. it will not be read by default in  the
730       future version.
731
732       $XDG_CACHE_HOME/fontconfig/*.cache-*  and   ~/.fontconfig/*.cache-*  is
733       the conventional repository of font information that isn't found in the
734       per-directory caches. This file is automatically maintained by fontcon‐
735       fig. please note that ~/.fontconfig/*.cache-*  is  deprecated  now.  it
736       will not be read by default in the future version.
737

ENVIRONMENT VARIABLES

739       FONTCONFIG_FILE is used to override the default configuration file.
740
741       FONTCONFIG_PATH  is  used  to override the default configuration direc‐
742       tory.
743
744       FC_DEBUG is used to output the detailed debugging messages. see  Debug‐
745       ging Applications section for more details.
746
747       FC_DBG_MATCH_FILTER  is  used  to filter out the patterns. this takes a
748       comma-separated list of object names and effects only when FC_DEBUG has
749       MATCH2. see Debugging Applications section for more details.
750
751       FC_LANG  is used to specify the default language as the weak binding in
752       the query. if this isn't set, the default language will  be  determined
753       from current locale.
754
755       FONTCONFIG_USE_MMAP is used to control the use of mmap(2) for the cache
756       files if available. this take a boolean value. fontconfig  will  checks
757       if  the  cache  files  are stored on the filesystem that is safe to use
758       mmap(2). explicitly setting this environment variable will causes skip‐
759       ping this check and enforce to use or not use mmap(2) anyway.
760

SEE ALSO

762       fc-cat(1), fc-cache(1), fc-list(1), fc-match(1), fc-query(1)
763

VERSION

765       Fontconfig version 2.13.0
766
767
768
769                                  06 3月 2018                    FONTS-CONF(5)
Impressum