1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<HTML
3><HEAD
4><TITLE
5>fonts-conf</TITLE
6><META
7NAME="GENERATOR"
8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD
9><BODY
10CLASS="REFENTRY"
11BGCOLOR="#FFFFFF"
12TEXT="#000000"
13LINK="#0000FF"
14VLINK="#840084"
15ALINK="#0000FF"
16><H1
17><A
18NAME="AEN1"
19></A
20>fonts-conf</H1
21><DIV
22CLASS="REFNAMEDIV"
23><A
24NAME="AEN5"
25></A
26><H2
27>Name</H2
28>fonts.conf&nbsp;--&nbsp;Font configuration files</DIV
29><DIV
30CLASS="REFSYNOPSISDIV"
31><A
32NAME="AEN8"
33></A
34><H2
35>Synopsis</H2
36><TABLE
37BORDER="0"
38BGCOLOR="#E0E0E0"
39WIDTH="100%"
40><TR
41><TD
42><PRE
43CLASS="SYNOPSIS"
44>   /etc/fonts/fonts.conf
45   /etc/fonts/fonts.dtd
46   /etc/fonts/conf.d
47   $XDG_CONFIG_HOME/fontconfig/conf.d
48   $XDG_CONFIG_HOME/fontconfig/fonts.conf
49   ~/.fonts.conf.d
50   ~/.fonts.conf</PRE
51></TD
52></TR
53></TABLE
54></DIV
55><DIV
56CLASS="REFSECT1"
57><A
58NAME="AEN10"
59></A
60><H2
61>Description</H2
62><P
63>Fontconfig is a library designed to provide system-wide font configuration,
64customization and application access.
65  </P
66></DIV
67><DIV
68CLASS="REFSECT1"
69><A
70NAME="AEN13"
71></A
72><H2
73>Functional Overview</H2
74><P
75>Fontconfig contains two essential modules, the configuration module which
76builds an internal configuration from XML files and the matching module
77which accepts font patterns and returns the nearest matching font.
78  </P
79><DIV
80CLASS="REFSECT2"
81><A
82NAME="AEN16"
83></A
84><H3
85>Font Configuration</H3
86><P
87>The configuration module consists of the FcConfig datatype, libexpat and
88FcConfigParse which walks over an XML tree and amends a configuration with
89data found within.  From an external perspective, configuration of the
90library consists of generating a valid XML tree and feeding that to
91FcConfigParse.  The only other mechanism provided to applications for
92changing the running configuration is to add fonts and directories to the
93list of application-provided font files.
94    </P
95><P
96>The intent is to make font configurations relatively static, and shared by
97as many applications as possible.  It is hoped that this will lead to more
98stable font selection when passing names from one application to another.
99XML was chosen as a configuration file format because it provides a format
100which is easy for external agents to edit while retaining the correct
101structure and syntax.
102    </P
103><P
104>Font configuration is separate from font matching; applications needing to
105do their own matching can access the available fonts from the library and
106perform private matching.  The intent is to permit applications to pick and
107choose appropriate functionality from the library instead of forcing them to
108choose between this library and a private configuration mechanism.  The hope
109is that this will ensure that configuration of fonts for all applications
110can be centralized in one place.  Centralizing font configuration will
111simplify and regularize font installation and customization.
112    </P
113></DIV
114><DIV
115CLASS="REFSECT2"
116><A
117NAME="AEN21"
118></A
119><H3
120>Font Properties</H3
121><P
122>While font patterns may contain essentially any properties, there are some
123well known properties with associated types.  Fontconfig uses some of these
124properties for font matching and font completion.  Others are provided as a
125convenience for the applications' rendering mechanism.
126    </P
127><TABLE
128BORDER="0"
129BGCOLOR="#E0E0E0"
130WIDTH="100%"
131><TR
132><TD
133><PRE
134CLASS="PROGRAMLISTING"
135>Property        Type    Description
136--------------------------------------------------------------
137family          String  Font family names
138familylang      String  Languages corresponding to each family
139style           String  Font style. Overrides weight and slant
140stylelang       String  Languages corresponding to each style
141fullname        String  Font full names (often includes style)
142fullnamelang    String  Languages corresponding to each fullname
143slant           Int     Italic, oblique or roman
144weight          Int     Light, medium, demibold, bold or black
145size            Double  Point size
146width           Int     Condensed, normal or expanded
147aspect          Double  Stretches glyphs horizontally before hinting
148pixelsize       Double  Pixel size
149spacing         Int     Proportional, dual-width, monospace or charcell
150foundry         String  Font foundry name
151antialias       Bool    Whether glyphs can be antialiased
152hinting         Bool    Whether the rasterizer should use hinting
153hintstyle       Int     Automatic hinting style
154verticallayout  Bool    Use vertical layout
155autohint        Bool    Use autohinter instead of normal hinter
156globaladvance   Bool    Use font global advance data (deprecated)
157file            String  The filename holding the font
158index           Int     The index of the font within the file
159ftface          FT_Face Use the specified FreeType face object
160rasterizer      String  Which rasterizer is in use (deprecated)
161outline         Bool    Whether the glyphs are outlines
162scalable        Bool    Whether glyphs can be scaled
163color           Bool    Whether any glyphs have color
164scale           Double  Scale factor for point-&#62;pixel conversions
165                        (deprecated)
166dpi             Double  Target dots per inch
167rgba            Int     unknown, rgb, bgr, vrgb, vbgr,
168                        none - subpixel geometry
169lcdfilter       Int     Type of LCD filter
170minspace        Bool    Eliminate leading from line spacing
171charset         CharSet Unicode chars encoded by the font
172lang            String  List of RFC-3066-style languages this
173                        font supports
174fontversion     Int     Version number of the font
175capability      String  List of layout capabilities in the font
176fontformat      String  String name of the font format
177embolden        Bool    Rasterizer should synthetically embolden the font
178embeddedbitmap  Bool    Use the embedded bitmap instead of the outline
179decorative      Bool    Whether the style is a decorative variant
180fontfeatures    String  List of the feature tags in OpenType to be enabled
181namelang        String  Language name to be used for the default value of
182                        familylang, stylelang, and fullnamelang
183prgname         String  String  Name of the running program
184postscriptname  String  Font family name in PostScript
185fonthashint     Bool    Whether the font has hinting
186order           Int     Order number of the font
187    </PRE
188></TD
189></TR
190></TABLE
191></DIV
192><DIV
193CLASS="REFSECT2"
194><A
195NAME="AEN25"
196></A
197><H3
198>Font Matching</H3
199><P
200>Fontconfig performs matching by measuring the distance from a provided
201pattern to all of the available fonts in the system.  The closest matching
202font is selected.  This ensures that a font will always be returned, but
203doesn't ensure that it is anything like the requested pattern.
204    </P
205><P
206>Font matching starts with an application constructed pattern.  The desired
207attributes of the resulting font are collected together in a pattern.  Each
208property of the pattern can contain one or more values; these are listed in
209priority order; matches earlier in the list are considered "closer" than
210matches later in the list.
211    </P
212><P
213>The initial pattern is modified by applying the list of editing instructions
214specific to patterns found in the configuration; each consists of a match
215predicate and a set of editing operations.  They are executed in the order
216they appeared in the configuration.  Each match causes the associated
217sequence of editing operations to be applied.
218    </P
219><P
220>After the pattern has been edited, a sequence of default substitutions are
221performed to canonicalize the set of available properties; this avoids the
222need for the lower layers to constantly provide default values for various
223font properties during rendering.
224    </P
225><P
226>The canonical font pattern is finally matched against all available fonts.
227The distance from the pattern to the font is measured for each of several
228properties: foundry, charset, family, lang, spacing, pixelsize, style,
229slant, weight, antialias, rasterizer and outline.  This list is in priority
230order -- results of comparing earlier elements of this list weigh more
231heavily than later elements.
232    </P
233><P
234>There is one special case to this rule; family names are split into two
235bindings; strong and weak.  Strong family names are given greater precedence
236in the match than lang elements while weak family names are given lower
237precedence than lang elements.  This permits the document language to drive
238font selection when any document specified font is unavailable.
239    </P
240><P
241>The pattern representing that font is augmented to include any properties
242found in the pattern but not found in the font itself; this permits the
243application to pass rendering instructions or any other data through the
244matching system.  Finally, the list of editing instructions specific to
245fonts found in the configuration are applied to the pattern.  This modified
246pattern is returned to the application.
247    </P
248><P
249>The return value contains sufficient information to locate and rasterize the
250font, including the file name, pixel size and other rendering data.  As
251none of the information involved pertains to the FreeType library,
252applications are free to use any rasterization engine or even to take
253the identified font file and access it directly.
254    </P
255><P
256>The match/edit sequences in the configuration are performed in two passes
257because there are essentially two different operations necessary -- the
258first is to modify how fonts are selected; aliasing families and adding
259suitable defaults.  The second is to modify how the selected fonts are
260rasterized.  Those must apply to the selected font, not the original pattern
261as false matches will often occur.
262    </P
263></DIV
264><DIV
265CLASS="REFSECT2"
266><A
267NAME="AEN36"
268></A
269><H3
270>Font Names</H3
271><P
272>Fontconfig provides a textual representation for patterns that the library
273can both accept and generate.  The representation is in three parts, first a
274list of family names, second a list of point sizes and finally a list of
275additional properties:
276    </P
277><TABLE
278BORDER="0"
279BGCOLOR="#E0E0E0"
280WIDTH="100%"
281><TR
282><TD
283><PRE
284CLASS="PROGRAMLISTING"
285>&#60;families&#62;-&#60;point sizes&#62;:&#60;name1&#62;=&#60;values1&#62;:&#60;name2&#62;=&#60;values2&#62;...
286    </PRE
287></TD
288></TR
289></TABLE
290><P
291>Values in a list are separated with commas.  The name needn't include either
292families or point sizes; they can be elided.  In addition, there are
293symbolic constants that simultaneously indicate both a name and a value.
294Here are some examples:
295    </P
296><TABLE
297BORDER="0"
298BGCOLOR="#E0E0E0"
299WIDTH="100%"
300><TR
301><TD
302><PRE
303CLASS="PROGRAMLISTING"
304>Name                            Meaning
305----------------------------------------------------------
306Times-12                        12 point Times Roman
307Times-12:bold                   12 point Times Bold
308Courier:italic                  Courier Italic in the default size
309Monospace:matrix=1 .1 0 1       The users preferred monospace font
310                                with artificial obliquing
311    </PRE
312></TD
313></TR
314></TABLE
315><P
316>The '\', '-', ':' and ',' characters in family names must be preceded by a
317'\' character to avoid having them misinterpreted. Similarly, values
318containing '\', '=', '_', ':' and ',' must also have them preceded by a
319'\' character. The '\' characters are stripped out of the family name and
320values as the font name is read.
321    </P
322></DIV
323></DIV
324><DIV
325CLASS="REFSECT1"
326><A
327NAME="DEBUG"
328></A
329><H2
330>Debugging Applications</H2
331><P
332>To help diagnose font and applications problems, fontconfig is built with a
333large amount of internal debugging left enabled. It is controlled by means
334of the FC_DEBUG environment variable. The value of this variable is
335interpreted as a number, and each bit within that value controls different
336debugging messages.
337  </P
338><TABLE
339BORDER="0"
340BGCOLOR="#E0E0E0"
341WIDTH="100%"
342><TR
343><TD
344><PRE
345CLASS="PROGRAMLISTING"
346>Name         Value    Meaning
347---------------------------------------------------------
348MATCH            1    Brief information about font matching
349MATCHV           2    Extensive font matching information
350EDIT             4    Monitor match/test/edit execution
351FONTSET          8    Track loading of font information at startup
352CACHE           16    Watch cache files being written
353CACHEV          32    Extensive cache file writing information
354PARSE           64    (no longer in use)
355SCAN           128    Watch font files being scanned to build caches
356SCANV          256    Verbose font file scanning information
357MEMORY         512    Monitor fontconfig memory usage
358CONFIG        1024    Monitor which config files are loaded
359LANGSET       2048    Dump char sets used to construct lang values
360MATCH2        4096    Display font-matching transformation in patterns
361  </PRE
362></TD
363></TR
364></TABLE
365><P
366>Add the value of the desired debug levels together and assign that (in
367base 10) to the FC_DEBUG environment variable before running the
368application. Output from these statements is sent to stdout.
369  </P
370></DIV
371><DIV
372CLASS="REFSECT1"
373><A
374NAME="AEN48"
375></A
376><H2
377>Lang Tags</H2
378><P
379>Each font in the database contains a list of languages it supports.  This is
380computed by comparing the Unicode coverage of the font with the orthography
381of each language.  Languages are tagged using an RFC-3066 compatible naming
382and occur in two parts -- the ISO 639 language tag followed a hyphen and then
383by the ISO 3166 country code.  The hyphen and country code may be elided.
384  </P
385><P
386>Fontconfig has orthographies for several languages built into the library.
387No provision has been made for adding new ones aside from rebuilding the
388library.  It currently supports 122 of the 139 languages named in ISO 639-1,
389141 of the languages with two-letter codes from ISO 639-2 and another 30
390languages with only three-letter codes.  Languages with both two and three
391letter codes are provided with only the two letter code.
392  </P
393><P
394>For languages used in multiple territories with radically different
395character sets, fontconfig includes per-territory orthographies.  This
396includes Azerbaijani, Kurdish, Pashto, Tigrinya and Chinese.
397  </P
398></DIV
399><DIV
400CLASS="REFSECT1"
401><A
402NAME="AEN53"
403></A
404><H2
405>Configuration File Format</H2
406><P
407>Configuration files for fontconfig are stored in XML format; this
408format makes external configuration tools easier to write and ensures that
409they will generate syntactically correct configuration files.  As XML
410files are plain text, they can also be manipulated by the expert user using
411a text editor.
412  </P
413><P
414>The fontconfig document type definition resides in the external entity
415"fonts.dtd"; this is normally stored in the default font configuration
416directory (/etc/fonts).  Each configuration file should contain the
417following structure:
418    <TABLE
419BORDER="0"
420BGCOLOR="#E0E0E0"
421WIDTH="100%"
422><TR
423><TD
424><PRE
425CLASS="PROGRAMLISTING"
426>&#60;?xml version="1.0"?&#62;
427&#60;!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"&#62;
428&#60;fontconfig&#62;
429...
430&#60;/fontconfig&#62;
431    </PRE
432></TD
433></TR
434></TABLE
435>
436  </P
437><DIV
438CLASS="REFSECT2"
439><A
440NAME="AEN58"
441></A
442><H3
443><TT
444CLASS="LITERAL"
445>&#60;fontconfig&#62;</TT
446></H3
447><P
448>This is the top level element for a font configuration and can contain
449<TT
450CLASS="LITERAL"
451>&#60;dir&#62;</TT
452>, <TT
453CLASS="LITERAL"
454>&#60;cachedir&#62;</TT
455>, <TT
456CLASS="LITERAL"
457>&#60;include&#62;</TT
458>, <TT
459CLASS="LITERAL"
460>&#60;match&#62;</TT
461> and <TT
462CLASS="LITERAL"
463>&#60;alias&#62;</TT
464> elements in any order.
465  </P
466></DIV
467><DIV
468CLASS="REFSECT2"
469><A
470NAME="AEN67"
471></A
472><H3
473><TT
474CLASS="LITERAL"
475>&#60;dir prefix="default" salt=""&#62;</TT
476></H3
477><P
478>This element contains a directory name which will be scanned for font files
479to include in the set of available fonts.
480  </P
481><P
482>If 'prefix' is set to "default" or "cwd", the current working directory will be added as the path prefix prior to the value. If 'prefix' is set to "xdg", the value in the XDG_DATA_HOME environment variable will be added as the path prefix. please see XDG Base Directory Specification for more details. If 'prefix' is set to "relative", the path of current file will be added prior to the value.
483  </P
484><P
485>'salt' property affects to determine cache filename. this is useful for example when having different fonts sets on same path at container and share fonts from host on different font path.
486  </P
487></DIV
488><DIV
489CLASS="REFSECT2"
490><A
491NAME="AEN73"
492></A
493><H3
494><TT
495CLASS="LITERAL"
496>&#60;cachedir prefix="default"&#62;</TT
497></H3
498><P
499>This element contains a directory name that is supposed to be stored or read
500the cache of font information.  If multiple elements are specified in
501the configuration file, the directory that can be accessed first in the list
502will be used to store the cache files.  If it starts with '~', it refers to
503a directory in the users home directory.  If 'prefix' is set to "xdg", the value in the XDG_CACHE_HOME environment variable will be added as the path prefix. please see XDG Base Directory Specification for more details.
504The default directory is ``$XDG_CACHE_HOME/fontconfig'' and it contains the cache files
505named ``<TT
506CLASS="LITERAL"
507>&#60;hash value&#62;</TT
508>-<TT
509CLASS="LITERAL"
510>&#60;architecture&#62;</TT
511>.cache-<TT
512CLASS="LITERAL"
513>&#60;version&#62;</TT
514>'',
515where <TT
516CLASS="LITERAL"
517>&#60;version&#62;</TT
518> is the fontconfig cache file
519version number (currently 8).
520  </P
521></DIV
522><DIV
523CLASS="REFSECT2"
524><A
525NAME="AEN81"
526></A
527><H3
528><TT
529CLASS="LITERAL"
530>&#60;include ignore_missing="no" prefix="default"&#62;</TT
531></H3
532><P
533>This element contains the name of an additional configuration file or
534directory.  If a directory, every file within that directory starting with an
535ASCII digit (U+0030 - U+0039) and ending with the string ``.conf'' will be processed in sorted order.  When
536the XML datatype is traversed by FcConfigParse, the contents of the file(s)
537will also be incorporated into the configuration by passing the filename(s) to
538FcConfigLoadAndParse.  If 'ignore_missing' is set to "yes" instead of the
539default "no", a missing file or directory will elicit no warning message from
540the library.  If 'prefix' is set to "xdg", the value in the XDG_CONFIG_HOME environment variable will be added as the path prefix. please see XDG Base Directory Specification for more details.
541  </P
542></DIV
543><DIV
544CLASS="REFSECT2"
545><A
546NAME="AEN85"
547></A
548><H3
549><TT
550CLASS="LITERAL"
551>&#60;config&#62;</TT
552></H3
553><P
554>This element provides a place to consolidate additional configuration
555information.  <TT
556CLASS="LITERAL"
557>&#60;config&#62;</TT
558> can contain <TT
559CLASS="LITERAL"
560>&#60;blank&#62;</TT
561> and <TT
562CLASS="LITERAL"
563>&#60;rescan&#62;</TT
564> elements in any
565order.
566  </P
567></DIV
568><DIV
569CLASS="REFSECT2"
570><A
571NAME="AEN92"
572></A
573><H3
574><TT
575CLASS="LITERAL"
576>&#60;description domain="fontconfig-conf"&#62;</TT
577></H3
578><P
579>This element is supposed to hold strings which describe what a config is used for.
580This string can be translated through gettext. 'domain' needs to be set the proper name to apply then.
581fontconfig will tries to retrieve translations with 'domain' from gettext.
582  </P
583></DIV
584><DIV
585CLASS="REFSECT2"
586><A
587NAME="AEN96"
588></A
589><H3
590><TT
591CLASS="LITERAL"
592>&#60;blank&#62;</TT
593></H3
594><P
595>Fonts often include "broken" glyphs which appear in the encoding but are
596drawn as blanks on the screen.  Within the <TT
597CLASS="LITERAL"
598>&#60;blank&#62;</TT
599> element, place each
600Unicode characters which is supposed to be blank in an <TT
601CLASS="LITERAL"
602>&#60;int&#62;</TT
603> element.
604Characters outside of this set which are drawn as blank will be elided from
605the set of characters supported by the font.
606  </P
607></DIV
608><DIV
609CLASS="REFSECT2"
610><A
611NAME="AEN102"
612></A
613><H3
614><TT
615CLASS="LITERAL"
616>&#60;remap-dir prefix="default" as-path="" salt=""&#62;</TT
617></H3
618><P
619>This element contains a directory name where will be mapped
620as the path 'as-path' in cached information.
621This is useful if the directory name is an alias
622(via a bind mount or symlink) to another directory in the system for
623which cached font information is likely to exist.
624  </P
625><P
626>'salt' property affects to determine cache filename as same as <TT
627CLASS="LITERAL"
628>&#60;dir&#62;</TT
629> element.
630  </P
631></DIV
632><DIV
633CLASS="REFSECT2"
634><A
635NAME="AEN108"
636></A
637><H3
638><TT
639CLASS="LITERAL"
640>&#60;reset-dirs /&#62;</TT
641></H3
642><P
643>This element removes all of fonts directories where added by <TT
644CLASS="LITERAL"
645>&#60;dir&#62;</TT
646> elements.
647This is useful to override fonts directories from system to own fonts directories only.
648  </P
649></DIV
650><DIV
651CLASS="REFSECT2"
652><A
653NAME="AEN113"
654></A
655><H3
656><TT
657CLASS="LITERAL"
658>&#60;rescan&#62;</TT
659></H3
660><P
661>The <TT
662CLASS="LITERAL"
663>&#60;rescan&#62;</TT
664> element holds an <TT
665CLASS="LITERAL"
666>&#60;int&#62;</TT
667> element which indicates the default
668interval between automatic checks for font configuration changes.
669Fontconfig will validate all of the configuration files and directories and
670automatically rebuild the internal datastructures when this interval passes.
671  </P
672></DIV
673><DIV
674CLASS="REFSECT2"
675><A
676NAME="AEN119"
677></A
678><H3
679><TT
680CLASS="LITERAL"
681>&#60;selectfont&#62;</TT
682></H3
683><P
684>This element is used to black/white list fonts from being listed or matched
685against.  It holds acceptfont and rejectfont elements.
686  </P
687></DIV
688><DIV
689CLASS="REFSECT2"
690><A
691NAME="AEN123"
692></A
693><H3
694><TT
695CLASS="LITERAL"
696>&#60;acceptfont&#62;</TT
697></H3
698><P
699>Fonts matched by an acceptfont element are "whitelisted"; such fonts are
700explicitly included in the set of fonts used to resolve list and match
701requests; including them in this list protects them from being "blacklisted"
702by a rejectfont element.  Acceptfont elements include glob and pattern
703elements which are used to match fonts.
704  </P
705></DIV
706><DIV
707CLASS="REFSECT2"
708><A
709NAME="AEN127"
710></A
711><H3
712><TT
713CLASS="LITERAL"
714>&#60;rejectfont&#62;</TT
715></H3
716><P
717>Fonts matched by an rejectfont element are "blacklisted"; such fonts are
718excluded from the set of fonts used to resolve list and match requests as if
719they didn't exist in the system.  Rejectfont elements include glob and
720pattern elements which are used to match fonts.
721  </P
722></DIV
723><DIV
724CLASS="REFSECT2"
725><A
726NAME="AEN131"
727></A
728><H3
729><TT
730CLASS="LITERAL"
731>&#60;glob&#62;</TT
732></H3
733><P
734>Glob elements hold shell-style filename matching patterns (including ? and
735*) which match fonts based on their complete pathnames. If it starts with '~',
736it refers to a directory in the users home directory.  This can be used to
737exclude a set of directories (/usr/share/fonts/uglyfont*), or particular
738font file types (*.pcf.gz), but the latter mechanism relies rather heavily
739on filenaming conventions which can't be relied upon.  Note that globs
740only apply to directories, not to individual fonts.
741  </P
742></DIV
743><DIV
744CLASS="REFSECT2"
745><A
746NAME="AEN135"
747></A
748><H3
749><TT
750CLASS="LITERAL"
751>&#60;pattern&#62;</TT
752></H3
753><P
754>Pattern elements perform list-style matching on incoming fonts; that is,
755they hold a list of elements and associated values.  If all of those
756elements have a matching value, then the pattern matches the font.  This can
757be used to select fonts based on attributes of the font (scalable, bold,
758etc), which is a more reliable mechanism than using file extensions.
759Pattern elements include patelt elements.
760  </P
761></DIV
762><DIV
763CLASS="REFSECT2"
764><A
765NAME="AEN139"
766></A
767><H3
768><TT
769CLASS="LITERAL"
770>&#60;patelt name="property"&#62;</TT
771></H3
772><P
773>Patelt elements hold a single pattern element and list of values.  They must
774have a 'name' attribute which indicates the pattern element name.  Patelt
775elements include int, double, string, matrix, bool, charset and const
776elements.
777  </P
778></DIV
779><DIV
780CLASS="REFSECT2"
781><A
782NAME="AEN143"
783></A
784><H3
785><TT
786CLASS="LITERAL"
787>&#60;match target="pattern"&#62;</TT
788></H3
789><P
790>This element holds first a (possibly empty) list of <TT
791CLASS="LITERAL"
792>&#60;test&#62;</TT
793> elements and then
794a (possibly empty) list of <TT
795CLASS="LITERAL"
796>&#60;edit&#62;</TT
797> elements.  Patterns which match all of the
798tests are subjected to all the edits.  If 'target' is set to "font" instead
799of the default "pattern", then this element applies to the font name
800resulting from a match rather than a font pattern to be matched. If 'target'
801is set to "scan", then this element applies when the font is scanned to
802build the fontconfig database.
803  </P
804></DIV
805><DIV
806CLASS="REFSECT2"
807><A
808NAME="AEN149"
809></A
810><H3
811><TT
812CLASS="LITERAL"
813>&#60;test qual="any" name="property" target="default" compare="eq"&#62;</TT
814></H3
815><P
816>This element contains a single value which is compared with the target
817('pattern', 'font', 'scan' or 'default') property "property" (substitute any of the property names seen
818above). 'compare' can be one of "eq", "not_eq", "less", "less_eq", "more", "more_eq", "contains" or
819"not_contains".  'qual' may either be the default, "any", in which case the match
820succeeds if any value associated with the property matches the test value, or
821"all", in which case all of the values associated with the property must
822match the test value.  'ignore-blanks' takes a boolean value. if 'ignore-blanks' is set "true", any blanks in the string will be ignored on its comparison. this takes effects only when compare="eq" or compare="not_eq".
823When used in a &#60;match target="font"&#62; element,
824the target= attribute in the &#60;test&#62; element selects between matching
825the original pattern or the font.  "default" selects whichever target the
826outer &#60;match&#62; element has selected.
827  </P
828></DIV
829><DIV
830CLASS="REFSECT2"
831><A
832NAME="AEN153"
833></A
834><H3
835><TT
836CLASS="LITERAL"
837>&#60;edit name="property" mode="assign" binding="weak"&#62;</TT
838></H3
839><P
840>This element contains a list of expression elements (any of the value or
841operator elements).  The expression elements are evaluated at run-time and
842modify the property "property".  The modification depends on whether
843"property" was matched by one of the associated <TT
844CLASS="LITERAL"
845>&#60;test&#62;</TT
846> elements, if so, the
847modification may affect the first matched value.  Any values inserted into
848the property are given the indicated binding ("strong", "weak" or "same")
849with "same" binding using the value from the matched pattern element.
850'mode' is one of:
851    <TABLE
852BORDER="0"
853BGCOLOR="#E0E0E0"
854WIDTH="100%"
855><TR
856><TD
857><PRE
858CLASS="PROGRAMLISTING"
859>Mode                    With Match              Without Match
860---------------------------------------------------------------------
861"assign"                Replace matching value  Replace all values
862"assign_replace"        Replace all values      Replace all values
863"prepend"               Insert before matching  Insert at head of list
864"prepend_first"         Insert at head of list  Insert at head of list
865"append"                Append after matching   Append at end of list
866"append_last"           Append at end of list   Append at end of list
867"delete"                Delete matching value   Delete all values
868"delete_all"            Delete all values       Delete all values
869    </PRE
870></TD
871></TR
872></TABLE
873>
874  </P
875></DIV
876><DIV
877CLASS="REFSECT2"
878><A
879NAME="AEN159"
880></A
881><H3
882><TT
883CLASS="LITERAL"
884>&#60;int&#62;</TT
885>, <TT
886CLASS="LITERAL"
887>&#60;double&#62;</TT
888>, <TT
889CLASS="LITERAL"
890>&#60;string&#62;</TT
891>, <TT
892CLASS="LITERAL"
893>&#60;bool&#62;</TT
894></H3
895><P
896>These elements hold a single value of the indicated type.  <TT
897CLASS="LITERAL"
898>&#60;bool&#62;</TT
899>
900elements hold either true or false.  An important limitation exists in
901the parsing of floating point numbers -- fontconfig requires that
902the mantissa start with a digit, not a decimal point, so insert a leading
903zero for purely fractional values (e.g. use 0.5 instead of .5 and -0.5
904instead of -.5).
905  </P
906></DIV
907><DIV
908CLASS="REFSECT2"
909><A
910NAME="AEN167"
911></A
912><H3
913><TT
914CLASS="LITERAL"
915>&#60;matrix&#62;</TT
916></H3
917><P
918>This element holds four numerical expressions of an affine transformation.
919At their simplest these will be four <TT
920CLASS="LITERAL"
921>&#60;double&#62;</TT
922> elements
923but they can also be more involved expressions.
924  </P
925></DIV
926><DIV
927CLASS="REFSECT2"
928><A
929NAME="AEN172"
930></A
931><H3
932><TT
933CLASS="LITERAL"
934>&#60;range&#62;</TT
935></H3
936><P
937>This element holds the two <TT
938CLASS="LITERAL"
939>&#60;int&#62;</TT
940> elements of a range
941representation.
942  </P
943></DIV
944><DIV
945CLASS="REFSECT2"
946><A
947NAME="AEN177"
948></A
949><H3
950><TT
951CLASS="LITERAL"
952>&#60;charset&#62;</TT
953></H3
954><P
955>This element holds at least one <TT
956CLASS="LITERAL"
957>&#60;int&#62;</TT
958> element of
959an Unicode code point or more.
960  </P
961></DIV
962><DIV
963CLASS="REFSECT2"
964><A
965NAME="AEN182"
966></A
967><H3
968><TT
969CLASS="LITERAL"
970>&#60;langset&#62;</TT
971></H3
972><P
973>This element holds at least one <TT
974CLASS="LITERAL"
975>&#60;string&#62;</TT
976> element of
977a RFC-3066-style languages or more.
978  </P
979></DIV
980><DIV
981CLASS="REFSECT2"
982><A
983NAME="AEN187"
984></A
985><H3
986><TT
987CLASS="LITERAL"
988>&#60;name&#62;</TT
989></H3
990><P
991>Holds a property name.  Evaluates to the first value from the property of
992the pattern.  If the 'target' attribute is not present, it will default to
993'default', in which case the property is returned from the font pattern
994during a target="font" match, and to the pattern during a target="pattern"
995match.  The attribute can also take the values 'font' or 'pattern' to
996explicitly choose which pattern to use.  It is an error to use a target
997of 'font' in a match that has target="pattern".
998  </P
999></DIV
1000><DIV
1001CLASS="REFSECT2"
1002><A
1003NAME="AEN191"
1004></A
1005><H3
1006><TT
1007CLASS="LITERAL"
1008>&#60;const&#62;</TT
1009></H3
1010><P
1011>Holds the name of a constant; these are always integers and serve as
1012symbolic names for common font values:
1013    <TABLE
1014BORDER="0"
1015BGCOLOR="#E0E0E0"
1016WIDTH="100%"
1017><TR
1018><TD
1019><PRE
1020CLASS="PROGRAMLISTING"
1021>Constant        Property        Value
1022-------------------------------------
1023thin            weight          0
1024extralight      weight          40
1025ultralight      weight          40
1026light           weight          50
1027demilight       weight          55
1028semilight       weight          55
1029book            weight          75
1030regular         weight          80
1031normal          weight          80
1032medium          weight          100
1033demibold        weight          180
1034semibold        weight          180
1035bold            weight          200
1036extrabold       weight          205
1037ultrabold       weight          205
1038black           weight          210
1039heavy           weight          210
1040extrablack      weight          215
1041ultrablack      weight          215
1042roman           slant           0
1043italic          slant           100
1044oblique         slant           110
1045ultracondensed  width           50
1046extracondensed  width           63
1047condensed       width           75
1048semicondensed   width           87
1049normal          width           100
1050semiexpanded    width           113
1051expanded        width           125
1052extraexpanded   width           150
1053ultraexpanded   width           200
1054proportional    spacing         0
1055dual            spacing         90
1056mono            spacing         100
1057charcell        spacing         110
1058unknown         rgba            0
1059rgb             rgba            1
1060bgr             rgba            2
1061vrgb            rgba            3
1062vbgr            rgba            4
1063none            rgba            5
1064lcdnone         lcdfilter       0
1065lcddefault      lcdfilter       1
1066lcdlight        lcdfilter       2
1067lcdlegacy       lcdfilter       3
1068hintnone        hintstyle       0
1069hintslight      hintstyle       1
1070hintmedium      hintstyle       2
1071hintfull        hintstyle       3
1072    </PRE
1073></TD
1074></TR
1075></TABLE
1076>
1077      </P
1078></DIV
1079><DIV
1080CLASS="REFSECT2"
1081><A
1082NAME="AEN196"
1083></A
1084><H3
1085><TT
1086CLASS="LITERAL"
1087>&#60;or&#62;</TT
1088>, <TT
1089CLASS="LITERAL"
1090>&#60;and&#62;</TT
1091>, <TT
1092CLASS="LITERAL"
1093>&#60;plus&#62;</TT
1094>, <TT
1095CLASS="LITERAL"
1096>&#60;minus&#62;</TT
1097>, <TT
1098CLASS="LITERAL"
1099>&#60;times&#62;</TT
1100>, <TT
1101CLASS="LITERAL"
1102>&#60;divide&#62;</TT
1103></H3
1104><P
1105>These elements perform the specified operation on a list of expression
1106elements.  <TT
1107CLASS="LITERAL"
1108>&#60;or&#62;</TT
1109> and <TT
1110CLASS="LITERAL"
1111>&#60;and&#62;</TT
1112> are boolean, not bitwise.
1113      </P
1114></DIV
1115><DIV
1116CLASS="REFSECT2"
1117><A
1118NAME="AEN207"
1119></A
1120><H3
1121><TT
1122CLASS="LITERAL"
1123>&#60;eq&#62;</TT
1124>, <TT
1125CLASS="LITERAL"
1126>&#60;not_eq&#62;</TT
1127>, <TT
1128CLASS="LITERAL"
1129>&#60;less&#62;</TT
1130>, <TT
1131CLASS="LITERAL"
1132>&#60;less_eq&#62;</TT
1133>, <TT
1134CLASS="LITERAL"
1135>&#60;more&#62;</TT
1136>, <TT
1137CLASS="LITERAL"
1138>&#60;more_eq&#62;</TT
1139>, <TT
1140CLASS="LITERAL"
1141>&#60;contains&#62;</TT
1142>, <TT
1143CLASS="LITERAL"
1144>&#60;not_contains</TT
1145></H3
1146><P
1147>These elements compare two values, producing a boolean result.
1148  </P
1149></DIV
1150><DIV
1151CLASS="REFSECT2"
1152><A
1153NAME="AEN218"
1154></A
1155><H3
1156><TT
1157CLASS="LITERAL"
1158>&#60;not&#62;</TT
1159></H3
1160><P
1161>Inverts the boolean sense of its one expression element
1162  </P
1163></DIV
1164><DIV
1165CLASS="REFSECT2"
1166><A
1167NAME="AEN222"
1168></A
1169><H3
1170><TT
1171CLASS="LITERAL"
1172>&#60;if&#62;</TT
1173></H3
1174><P
1175>This element takes three expression elements; if the value of the first is
1176true, it produces the value of the second, otherwise it produces the value
1177of the third.
1178  </P
1179></DIV
1180><DIV
1181CLASS="REFSECT2"
1182><A
1183NAME="AEN226"
1184></A
1185><H3
1186><TT
1187CLASS="LITERAL"
1188>&#60;alias&#62;</TT
1189></H3
1190><P
1191>Alias elements provide a shorthand notation for the set of common match
1192operations needed to substitute one font family for another.  They contain a
1193<TT
1194CLASS="LITERAL"
1195>&#60;family&#62;</TT
1196> element followed by optional <TT
1197CLASS="LITERAL"
1198>&#60;prefer&#62;</TT
1199>, <TT
1200CLASS="LITERAL"
1201>&#60;accept&#62;</TT
1202> and <TT
1203CLASS="LITERAL"
1204>&#60;default&#62;</TT
1205>
1206elements.  Fonts matching the <TT
1207CLASS="LITERAL"
1208>&#60;family&#62;</TT
1209> element are edited to prepend the
1210list of <TT
1211CLASS="LITERAL"
1212>&#60;prefer&#62;</TT
1213>ed families before the matching <TT
1214CLASS="LITERAL"
1215>&#60;family&#62;</TT
1216>, append the
1217<TT
1218CLASS="LITERAL"
1219>&#60;accept&#62;</TT
1220>able families after the matching <TT
1221CLASS="LITERAL"
1222>&#60;family&#62;</TT
1223> and append the <TT
1224CLASS="LITERAL"
1225>&#60;default&#62;</TT
1226>
1227families to the end of the family list.
1228  </P
1229></DIV
1230><DIV
1231CLASS="REFSECT2"
1232><A
1233NAME="AEN240"
1234></A
1235><H3
1236><TT
1237CLASS="LITERAL"
1238>&#60;family&#62;</TT
1239></H3
1240><P
1241>Holds a single font family name
1242  </P
1243></DIV
1244><DIV
1245CLASS="REFSECT2"
1246><A
1247NAME="AEN244"
1248></A
1249><H3
1250><TT
1251CLASS="LITERAL"
1252>&#60;prefer&#62;</TT
1253>, <TT
1254CLASS="LITERAL"
1255>&#60;accept&#62;</TT
1256>, <TT
1257CLASS="LITERAL"
1258>&#60;default&#62;</TT
1259></H3
1260><P
1261>These hold a list of <TT
1262CLASS="LITERAL"
1263>&#60;family&#62;</TT
1264> elements to be used by the <TT
1265CLASS="LITERAL"
1266>&#60;alias&#62;</TT
1267> element.
1268  </P
1269></DIV
1270></DIV
1271><DIV
1272CLASS="REFSECT1"
1273><A
1274NAME="AEN252"
1275></A
1276><H2
1277>EXAMPLE CONFIGURATION FILE</H2
1278><DIV
1279CLASS="REFSECT2"
1280><A
1281NAME="AEN254"
1282></A
1283><H3
1284>System configuration file</H3
1285><P
1286>This is an example of a system-wide configuration file
1287    </P
1288><TABLE
1289BORDER="0"
1290BGCOLOR="#E0E0E0"
1291WIDTH="100%"
1292><TR
1293><TD
1294><PRE
1295CLASS="PROGRAMLISTING"
1296>&#60;?xml version="1.0"?&#62;
1297&#60;!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"&#62;
1298&#60;!-- /etc/fonts/fonts.conf file to configure system font access --&#62;
1299&#60;fontconfig&#62;
1300  &#60;!--
1301    Find fonts in these directories
1302  --&#62;
1303  &#60;dir&#62;/usr/share/fonts&#60;/dir&#62;
1304  &#60;dir&#62;/usr/X11R6/lib/X11/fonts&#60;/dir&#62;
1305
1306  &#60;!--
1307    Accept deprecated 'mono' alias, replacing it with 'monospace'
1308  --&#62;
1309  &#60;match target="pattern"&#62;
1310    &#60;test qual="any" name="family"&#62;
1311      &#60;string&#62;mono&#60;/string&#62;
1312    &#60;/test&#62;
1313    &#60;edit name="family" mode="assign"&#62;
1314      &#60;string&#62;monospace&#60;/string&#62;
1315    &#60;/edit&#62;
1316  &#60;/match&#62;
1317
1318  &#60;!--
1319    Names not including any well known alias are given 'sans-serif'
1320  --&#62;
1321  &#60;match target="pattern"&#62;
1322    &#60;test qual="all" name="family" compare="not_eq"&#62;
1323      &#60;string&#62;sans-serif&#60;/string&#62;
1324    &#60;/test&#62;
1325    &#60;test qual="all" name="family" compare="not_eq"&#62;
1326      &#60;string&#62;serif&#60;/string&#62;
1327    &#60;/test&#62;
1328    &#60;test qual="all" name="family" compare="not_eq"&#62;
1329      &#60;string&#62;monospace&#60;/string&#62;
1330    &#60;/test&#62;
1331    &#60;edit name="family" mode="append_last"&#62;
1332      &#60;string&#62;sans-serif&#60;/string&#62;
1333    &#60;/edit&#62;
1334  &#60;/match&#62;
1335
1336  &#60;!--
1337    Load per-user customization file, but don't complain
1338    if it doesn't exist
1339  --&#62;
1340  &#60;include ignore_missing="yes" prefix="xdg"&#62;
1341    fontconfig/fonts.conf
1342  &#60;/include&#62;
1343
1344  &#60;!--
1345    Load local customization files, but don't complain
1346    if there aren't any
1347  --&#62;
1348  &#60;include ignore_missing="yes"&#62;conf.d&#60;/include&#62;
1349  &#60;include ignore_missing="yes"&#62;local.conf&#60;/include&#62;
1350
1351  &#60;!--
1352    Alias well known font names to available TrueType fonts.
1353    These substitute TrueType faces for similar Type1
1354    faces to improve screen appearance.
1355  --&#62;
1356  &#60;alias&#62;
1357    &#60;family&#62;Times&#60;/family&#62;
1358    &#60;prefer&#62;
1359      &#60;family&#62;Times New Roman&#60;/family&#62;
1360    &#60;/prefer&#62;
1361    &#60;default&#62;
1362      &#60;family&#62;serif&#60;/family&#62;
1363    &#60;/default&#62;
1364  &#60;/alias&#62;
1365  &#60;alias&#62;
1366    &#60;family&#62;Helvetica&#60;/family&#62;
1367    &#60;prefer&#62;
1368      &#60;family&#62;Arial&#60;/family&#62;
1369    &#60;/prefer&#62;
1370    &#60;default&#62;
1371      &#60;family&#62;sans&#60;/family&#62;
1372    &#60;/default&#62;
1373  &#60;/alias&#62;
1374  &#60;alias&#62;
1375    &#60;family&#62;Courier&#60;/family&#62;
1376    &#60;prefer&#62;
1377      &#60;family&#62;Courier New&#60;/family&#62;
1378    &#60;/prefer&#62;
1379    &#60;default&#62;
1380      &#60;family&#62;monospace&#60;/family&#62;
1381    &#60;/default&#62;
1382  &#60;/alias&#62;
1383
1384  &#60;!--
1385    Provide required aliases for standard names
1386    Do these after the users configuration file so that
1387    any aliases there are used preferentially
1388  --&#62;
1389  &#60;alias&#62;
1390    &#60;family&#62;serif&#60;/family&#62;
1391    &#60;prefer&#62;
1392      &#60;family&#62;Times New Roman&#60;/family&#62;
1393    &#60;/prefer&#62;
1394  &#60;/alias&#62;
1395  &#60;alias&#62;
1396    &#60;family&#62;sans&#60;/family&#62;
1397    &#60;prefer&#62;
1398      &#60;family&#62;Arial&#60;/family&#62;
1399    &#60;/prefer&#62;
1400  &#60;/alias&#62;
1401  &#60;alias&#62;
1402    &#60;family&#62;monospace&#60;/family&#62;
1403    &#60;prefer&#62;
1404      &#60;family&#62;Andale Mono&#60;/family&#62;
1405    &#60;/prefer&#62;
1406  &#60;/alias&#62;
1407
1408  &#60;--
1409    The example of the requirements of OR operator;
1410    If the 'family' contains 'Courier New' OR 'Courier'
1411    add 'monospace' as the alternative
1412  --&#62;
1413  &#60;match target="pattern"&#62;
1414    &#60;test name="family" compare="eq"&#62;
1415      &#60;string&#62;Courier New&#60;/string&#62;
1416    &#60;/test&#62;
1417    &#60;edit name="family" mode="prepend"&#62;
1418      &#60;string&#62;monospace&#60;/string&#62;
1419    &#60;/edit&#62;
1420  &#60;/match&#62;
1421  &#60;match target="pattern"&#62;
1422    &#60;test name="family" compare="eq"&#62;
1423      &#60;string&#62;Courier&#60;/string&#62;
1424    &#60;/test&#62;
1425    &#60;edit name="family" mode="prepend"&#62;
1426      &#60;string&#62;monospace&#60;/string&#62;
1427    &#60;/edit&#62;
1428  &#60;/match&#62;
1429
1430&#60;/fontconfig&#62;
1431    </PRE
1432></TD
1433></TR
1434></TABLE
1435></DIV
1436><DIV
1437CLASS="REFSECT2"
1438><A
1439NAME="AEN258"
1440></A
1441><H3
1442>User configuration file</H3
1443><P
1444>This is an example of a per-user configuration file that lives in
1445$XDG_CONFIG_HOME/fontconfig/fonts.conf
1446    </P
1447><TABLE
1448BORDER="0"
1449BGCOLOR="#E0E0E0"
1450WIDTH="100%"
1451><TR
1452><TD
1453><PRE
1454CLASS="PROGRAMLISTING"
1455>&#60;?xml version="1.0"?&#62;
1456&#60;!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"&#62;
1457&#60;!--
1458  $XDG_CONFIG_HOME/fontconfig/fonts.conf for per-user font configuration
1459--&#62;
1460&#60;fontconfig&#62;
1461
1462  &#60;!--
1463    Private font directory
1464  --&#62;
1465  &#60;dir prefix="xdg"&#62;fonts&#60;/dir&#62;
1466
1467  &#60;!--
1468    use rgb sub-pixel ordering to improve glyph appearance on
1469    LCD screens.  Changes affecting rendering, but not matching
1470    should always use target="font".
1471  --&#62;
1472  &#60;match target="font"&#62;
1473    &#60;edit name="rgba" mode="assign"&#62;
1474      &#60;const&#62;rgb&#60;/const&#62;
1475    &#60;/edit&#62;
1476  &#60;/match&#62;
1477  &#60;!--
1478    use WenQuanYi Zen Hei font when serif is requested for Chinese
1479  --&#62;
1480  &#60;match&#62;
1481    &#60;!--
1482      If you don't want to use WenQuanYi Zen Hei font for zh-tw etc,
1483      you can use zh-cn instead of zh.
1484      Please note, even if you set zh-cn, it still matches zh.
1485      if you don't like it, you can use compare="eq"
1486      instead of compare="contains".
1487    --&#62;
1488    &#60;test name="lang" compare="contains"&#62;
1489      &#60;string&#62;zh&#60;/string&#62;
1490    &#60;/test&#62;
1491    &#60;test name="family"&#62;
1492      &#60;string&#62;serif&#60;/string&#62;
1493    &#60;/test&#62;
1494    &#60;edit name="family" mode="prepend"&#62;
1495      &#60;string&#62;WenQuanYi Zen Hei&#60;/string&#62;
1496    &#60;/edit&#62;
1497  &#60;/match&#62;
1498  &#60;!--
1499    use VL Gothic font when sans-serif is requested for Japanese
1500  --&#62;
1501  &#60;match&#62;
1502    &#60;test name="lang" compare="contains"&#62;
1503      &#60;string&#62;ja&#60;/string&#62;
1504    &#60;/test&#62;
1505    &#60;test name="family"&#62;
1506      &#60;string&#62;sans-serif&#60;/string&#62;
1507    &#60;/test&#62;
1508    &#60;edit name="family" mode="prepend"&#62;
1509      &#60;string&#62;VL Gothic&#60;/string&#62;
1510    &#60;/edit&#62;
1511  &#60;/match&#62;
1512&#60;/fontconfig&#62;
1513    </PRE
1514></TD
1515></TR
1516></TABLE
1517></DIV
1518></DIV
1519><DIV
1520CLASS="REFSECT1"
1521><A
1522NAME="AEN262"
1523></A
1524><H2
1525>Files</H2
1526><P
1527><I
1528CLASS="EMPHASIS"
1529>fonts.conf</I
1530>
1531contains configuration information for the fontconfig library
1532consisting of directories to look at for font information as well as
1533instructions on editing program specified font patterns before attempting to
1534match the available fonts.  It is in XML format.
1535  </P
1536><P
1537><I
1538CLASS="EMPHASIS"
1539>conf.d</I
1540>
1541is the conventional name for a directory of additional configuration files
1542managed by external applications or the local administrator.  The
1543filenames starting with decimal digits are sorted in lexicographic order
1544and used as additional configuration files.  All of these files are in XML
1545format.  The master fonts.conf file references this directory in an
1546&#60;include&#62; directive.
1547  </P
1548><P
1549><I
1550CLASS="EMPHASIS"
1551>fonts.dtd</I
1552>
1553is a DTD that describes the format of the configuration files.
1554  </P
1555><P
1556><I
1557CLASS="EMPHASIS"
1558>$XDG_CONFIG_HOME/fontconfig/conf.d</I
1559> and <I
1560CLASS="EMPHASIS"
1561>~/.fonts.conf.d</I
1562>
1563is the conventional name for a per-user directory of (typically
1564auto-generated) configuration files, although the
1565actual location is specified in the global fonts.conf file. please note that ~/.fonts.conf.d is deprecated now. it will not be read by default in the future version.
1566  </P
1567><P
1568><I
1569CLASS="EMPHASIS"
1570>$XDG_CONFIG_HOME/fontconfig/fonts.conf</I
1571> and <I
1572CLASS="EMPHASIS"
1573>~/.fonts.conf</I
1574>
1575is the conventional location for per-user font configuration, although the
1576actual location is specified in the global fonts.conf file. please note that ~/.fonts.conf is deprecated now. it will not be read by default in the future version.
1577  </P
1578><P
1579><I
1580CLASS="EMPHASIS"
1581>$XDG_CACHE_HOME/fontconfig/*.cache-*</I
1582> and <I
1583CLASS="EMPHASIS"
1584> ~/.fontconfig/*.cache-*</I
1585>
1586is the conventional repository of font information that isn't found in the
1587per-directory caches.  This file is automatically maintained by fontconfig. please note that ~/.fontconfig/*.cache-* is deprecated now. it will not be read by default in the future version.
1588  </P
1589></DIV
1590><DIV
1591CLASS="REFSECT1"
1592><A
1593NAME="AEN279"
1594></A
1595><H2
1596>Environment variables</H2
1597><P
1598><I
1599CLASS="EMPHASIS"
1600>FONTCONFIG_FILE</I
1601>
1602is used to override the default configuration file.
1603  </P
1604><P
1605><I
1606CLASS="EMPHASIS"
1607>FONTCONFIG_PATH</I
1608>
1609is used to override the default configuration directory.
1610  </P
1611><P
1612><I
1613CLASS="EMPHASIS"
1614>FONTCONFIG_SYSROOT</I
1615>
1616is used to set a default sysroot directory.
1617  </P
1618><P
1619><I
1620CLASS="EMPHASIS"
1621>FC_DEBUG</I
1622>
1623is used to output the detailed debugging messages. see <A
1624HREF="#DEBUG"
1625>Debugging Applications</A
1626> section for more details.
1627  </P
1628><P
1629><I
1630CLASS="EMPHASIS"
1631>FC_DBG_MATCH_FILTER</I
1632>
1633is used to filter out the patterns. this takes a comma-separated list of object names and effects only when FC_DEBUG has MATCH2. see <A
1634HREF="#DEBUG"
1635>Debugging Applications</A
1636> section for more details.
1637  </P
1638><P
1639><I
1640CLASS="EMPHASIS"
1641>FC_LANG</I
1642>
1643is used to specify the default language as the weak binding in the query. if this isn't set, the default language will be determined from current locale.
1644  </P
1645><P
1646><I
1647CLASS="EMPHASIS"
1648>FONTCONFIG_USE_MMAP</I
1649>
1650is used to control the use of mmap(2) for the cache files if available. this take a boolean value. fontconfig will checks if the cache files are stored on the filesystem that is safe to use mmap(2). explicitly setting this environment variable will causes skipping this check and enforce to use or not use mmap(2) anyway.
1651  </P
1652><P
1653><I
1654CLASS="EMPHASIS"
1655>SOURCE_DATE_EPOCH</I
1656>
1657is used to ensure <TT
1658CLASS="LITERAL"
1659>fc-cache(1)</TT
1660> generates files in a deterministic manner in order to support reproducible builds. When set to a numeric representation of UNIX timestamp, fontconfig will prefer this value over using the modification timestamps of the input files in order to identify which cache files require regeneration. If <TT
1661CLASS="LITERAL"
1662>SOURCE_DATE_EPOCH</TT
1663> is not set (or is newer than the mtime of the directory), the existing behaviour is unchanged.
1664  </P
1665></DIV
1666><DIV
1667CLASS="REFSECT1"
1668><A
1669NAME="AEN301"
1670></A
1671><H2
1672>See Also</H2
1673><P
1674>fc-cat(1), fc-cache(1), fc-list(1), fc-match(1), fc-query(1), <A
1675HREF="https://reproducible-builds.org/specs/source-date-epoch/"
1676TARGET="_top"
1677>SOURCE_DATE_EPOCH</A
1678>.
1679  </P
1680></DIV
1681><DIV
1682CLASS="REFSECT1"
1683><A
1684NAME="AEN305"
1685></A
1686><H2
1687>Version</H2
1688><P
1689>Fontconfig version 2.15.0
1690
1691            </P
1692></DIV
1693></BODY
1694></HTML
1695>