fontconfig-user.html revision 953daeba
1a6844aabSmrg<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
22c393a42Smrg<HTML
32c393a42Smrg><HEAD
42c393a42Smrg><TITLE
52c393a42Smrg>fonts-conf</TITLE
62c393a42Smrg><META
72c393a42SmrgNAME="GENERATOR"
82c393a42SmrgCONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD
92c393a42Smrg><BODY
102c393a42SmrgCLASS="REFENTRY"
112c393a42SmrgBGCOLOR="#FFFFFF"
122c393a42SmrgTEXT="#000000"
132c393a42SmrgLINK="#0000FF"
142c393a42SmrgVLINK="#840084"
152c393a42SmrgALINK="#0000FF"
162c393a42Smrg><H1
172c393a42Smrg><A
182c393a42SmrgNAME="AEN1"
192c393a42Smrg></A
202c393a42Smrg>fonts-conf</H1
212c393a42Smrg><DIV
222c393a42SmrgCLASS="REFNAMEDIV"
232c393a42Smrg><A
242c393a42SmrgNAME="AEN5"
252c393a42Smrg></A
262c393a42Smrg><H2
272c393a42Smrg>Name</H2
282c393a42Smrg>fonts.conf&nbsp;--&nbsp;Font configuration files</DIV
292c393a42Smrg><DIV
302c393a42SmrgCLASS="REFSYNOPSISDIV"
312c393a42Smrg><A
322c393a42SmrgNAME="AEN8"
332c393a42Smrg></A
342c393a42Smrg><H2
352c393a42Smrg>Synopsis</H2
36a6844aabSmrg><TABLE
37a6844aabSmrgBORDER="0"
38a6844aabSmrgBGCOLOR="#E0E0E0"
39a6844aabSmrgWIDTH="100%"
40a6844aabSmrg><TR
41a6844aabSmrg><TD
422c393a42Smrg><PRE
432c393a42SmrgCLASS="SYNOPSIS"
442c393a42Smrg>   /etc/fonts/fonts.conf
452c393a42Smrg   /etc/fonts/fonts.dtd
462c393a42Smrg   /etc/fonts/conf.d
47ca08ab68Smrg   $XDG_CONFIG_HOME/fontconfig/conf.d
48ca08ab68Smrg   $XDG_CONFIG_HOME/fontconfig/fonts.conf
49a6844aabSmrg   ~/.fonts.conf.d
502c393a42Smrg   ~/.fonts.conf</PRE
51a6844aabSmrg></TD
52a6844aabSmrg></TR
53a6844aabSmrg></TABLE
542c393a42Smrg></DIV
552c393a42Smrg><DIV
562c393a42SmrgCLASS="REFSECT1"
572c393a42Smrg><A
582c393a42SmrgNAME="AEN10"
592c393a42Smrg></A
602c393a42Smrg><H2
612c393a42Smrg>Description</H2
622c393a42Smrg><P
632c393a42Smrg>Fontconfig is a library designed to provide system-wide font configuration,
642c393a42Smrgcustomization and application access.
652c393a42Smrg  </P
662c393a42Smrg></DIV
672c393a42Smrg><DIV
682c393a42SmrgCLASS="REFSECT1"
692c393a42Smrg><A
702c393a42SmrgNAME="AEN13"
712c393a42Smrg></A
722c393a42Smrg><H2
732c393a42Smrg>Functional Overview</H2
742c393a42Smrg><P
752c393a42Smrg>Fontconfig contains two essential modules, the configuration module which
762c393a42Smrgbuilds an internal configuration from XML files and the matching module
772c393a42Smrgwhich accepts font patterns and returns the nearest matching font.
782c393a42Smrg  </P
792c393a42Smrg><DIV
802c393a42SmrgCLASS="REFSECT2"
812c393a42Smrg><A
822c393a42SmrgNAME="AEN16"
832c393a42Smrg></A
842c393a42Smrg><H3
852c393a42Smrg>Font Configuration</H3
862c393a42Smrg><P
872c393a42Smrg>The configuration module consists of the FcConfig datatype, libexpat and
882c393a42SmrgFcConfigParse which walks over an XML tree and amends a configuration with
892c393a42Smrgdata found within.  From an external perspective, configuration of the
902c393a42Smrglibrary consists of generating a valid XML tree and feeding that to
912c393a42SmrgFcConfigParse.  The only other mechanism provided to applications for
922c393a42Smrgchanging the running configuration is to add fonts and directories to the
932c393a42Smrglist of application-provided font files.  
942c393a42Smrg    </P
952c393a42Smrg><P
962c393a42Smrg>The intent is to make font configurations relatively static, and shared by
972c393a42Smrgas many applications as possible.  It is hoped that this will lead to more
982c393a42Smrgstable font selection when passing names from one application to another.
992c393a42SmrgXML was chosen as a configuration file format because it provides a format
1002c393a42Smrgwhich is easy for external agents to edit while retaining the correct
1012c393a42Smrgstructure and syntax.
1022c393a42Smrg    </P
1032c393a42Smrg><P
1042c393a42Smrg>Font configuration is separate from font matching; applications needing to
1052c393a42Smrgdo their own matching can access the available fonts from the library and
1062c393a42Smrgperform private matching.  The intent is to permit applications to pick and
1072c393a42Smrgchoose appropriate functionality from the library instead of forcing them to
1082c393a42Smrgchoose between this library and a private configuration mechanism.  The hope
1092c393a42Smrgis that this will ensure that configuration of fonts for all applications
1102c393a42Smrgcan be centralized in one place.  Centralizing font configuration will
1112c393a42Smrgsimplify and regularize font installation and customization.
1122c393a42Smrg    </P
1132c393a42Smrg></DIV
1142c393a42Smrg><DIV
1152c393a42SmrgCLASS="REFSECT2"
1162c393a42Smrg><A
1172c393a42SmrgNAME="AEN21"
1182c393a42Smrg></A
1192c393a42Smrg><H3
1202c393a42Smrg>Font Properties</H3
1212c393a42Smrg><P
1222c393a42Smrg>While font patterns may contain essentially any properties, there are some
1232c393a42Smrgwell known properties with associated types.  Fontconfig uses some of these
1242c393a42Smrgproperties for font matching and font completion.  Others are provided as a
1252c393a42Smrgconvenience for the applications' rendering mechanism.
1262c393a42Smrg    </P
127a6844aabSmrg><TABLE
128a6844aabSmrgBORDER="0"
129a6844aabSmrgBGCOLOR="#E0E0E0"
130a6844aabSmrgWIDTH="100%"
131a6844aabSmrg><TR
132a6844aabSmrg><TD
1332c393a42Smrg><PRE
1342c393a42SmrgCLASS="PROGRAMLISTING"
1352c393a42Smrg>  Property        Type    Description
1362c393a42Smrg  --------------------------------------------------------------
1372c393a42Smrg  family          String  Font family names
1382c393a42Smrg  familylang      String  Languages corresponding to each family
1392c393a42Smrg  style           String  Font style. Overrides weight and slant
1402c393a42Smrg  stylelang       String  Languages corresponding to each style
1412c393a42Smrg  fullname        String  Font full names (often includes style)
1422c393a42Smrg  fullnamelang    String  Languages corresponding to each fullname
1432c393a42Smrg  slant           Int     Italic, oblique or roman
1442c393a42Smrg  weight          Int     Light, medium, demibold, bold or black
1452c393a42Smrg  size            Double  Point size
1462c393a42Smrg  width           Int     Condensed, normal or expanded
1472c393a42Smrg  aspect          Double  Stretches glyphs horizontally before hinting
1482c393a42Smrg  pixelsize       Double  Pixel size
1492c393a42Smrg  spacing         Int     Proportional, dual-width, monospace or charcell
1502c393a42Smrg  foundry         String  Font foundry name
1512c393a42Smrg  antialias       Bool    Whether glyphs can be antialiased
1522c393a42Smrg  hinting         Bool    Whether the rasterizer should use hinting
1532c393a42Smrg  hintstyle       Int     Automatic hinting style
1542c393a42Smrg  verticallayout  Bool    Use vertical layout
1552c393a42Smrg  autohint        Bool    Use autohinter instead of normal hinter
156ca08ab68Smrg  globaladvance   Bool    Use font global advance data (deprecated)
1572c393a42Smrg  file            String  The filename holding the font
1582c393a42Smrg  index           Int     The index of the font within the file
1592c393a42Smrg  ftface          FT_Face Use the specified FreeType face object
1606fc018e4Smrg  rasterizer      String  Which rasterizer is in use (deprecated)
1612c393a42Smrg  outline         Bool    Whether the glyphs are outlines
1622c393a42Smrg  scalable        Bool    Whether glyphs can be scaled
163953daebaSmrg  color           Bool    Whether any glyphs have color
164953daebaSmrg  scale           Double  Scale factor for point-&#62;pixel conversions (deprecated)
1652c393a42Smrg  dpi             Double  Target dots per inch
1662c393a42Smrg  rgba            Int     unknown, rgb, bgr, vrgb, vbgr,
1672c393a42Smrg                          none - subpixel geometry
1682c393a42Smrg  lcdfilter       Int     Type of LCD filter
1692c393a42Smrg  minspace        Bool    Eliminate leading from line spacing
1702c393a42Smrg  charset         CharSet Unicode chars encoded by the font
1712c393a42Smrg  lang            String  List of RFC-3066-style languages this
1722c393a42Smrg                          font supports
1732c393a42Smrg  fontversion     Int     Version number of the font
1742c393a42Smrg  capability      String  List of layout capabilities in the font
175953daebaSmrg  fontformat      String  String name of the font format
1762c393a42Smrg  embolden        Bool    Rasterizer should synthetically embolden the font
177953daebaSmrg  embeddedbitmap  Bool    Use the embedded bitmap instead of the outline
178953daebaSmrg  decorative      Bool    Whether the style is a decorative variant
179c9710b42Smrg  fontfeatures    String  List of the feature tags in OpenType to be enabled
180953daebaSmrg  namelang        String  Language name to be used for the default value of
181953daebaSmrg                          familylang, stylelang, and fullnamelang
182c9710b42Smrg  prgname         String  String  Name of the running program
183953daebaSmrg  postscriptname  String  Font family name in PostScript
1842c393a42Smrg    </PRE
185a6844aabSmrg></TD
186a6844aabSmrg></TR
187a6844aabSmrg></TABLE
1882c393a42Smrg></DIV
1892c393a42Smrg><DIV
1902c393a42SmrgCLASS="REFSECT2"
1912c393a42Smrg><A
1922c393a42SmrgNAME="AEN25"
1932c393a42Smrg></A
1942c393a42Smrg><H3
1952c393a42Smrg>Font Matching</H3
1962c393a42Smrg><P
1972c393a42Smrg>Fontconfig performs matching by measuring the distance from a provided
1982c393a42Smrgpattern to all of the available fonts in the system.  The closest matching
1992c393a42Smrgfont is selected.  This ensures that a font will always be returned, but
2002c393a42Smrgdoesn't ensure that it is anything like the requested pattern.
2012c393a42Smrg    </P
2022c393a42Smrg><P
2032c393a42Smrg> 
2042c393a42SmrgFont matching starts with an application constructed pattern.  The desired
2052c393a42Smrgattributes of the resulting font are collected together in a pattern.  Each
2062c393a42Smrgproperty of the pattern can contain one or more values; these are listed in
2072c393a42Smrgpriority order; matches earlier in the list are considered "closer" than
2082c393a42Smrgmatches later in the list.
2092c393a42Smrg    </P
2102c393a42Smrg><P
2112c393a42Smrg>The initial pattern is modified by applying the list of editing instructions
2122c393a42Smrgspecific to patterns found in the configuration; each consists of a match
2132c393a42Smrgpredicate and a set of editing operations.  They are executed in the order
2142c393a42Smrgthey appeared in the configuration.  Each match causes the associated
2152c393a42Smrgsequence of editing operations to be applied.
2162c393a42Smrg    </P
2172c393a42Smrg><P
2182c393a42Smrg>After the pattern has been edited, a sequence of default substitutions are
2192c393a42Smrgperformed to canonicalize the set of available properties; this avoids the
2202c393a42Smrgneed for the lower layers to constantly provide default values for various
2212c393a42Smrgfont properties during rendering.
2222c393a42Smrg    </P
2232c393a42Smrg><P
2242c393a42Smrg>The canonical font pattern is finally matched against all available fonts.
2252c393a42SmrgThe distance from the pattern to the font is measured for each of several
2262c393a42Smrgproperties: foundry, charset, family, lang, spacing, pixelsize, style,
2272c393a42Smrgslant, weight, antialias, rasterizer and outline.  This list is in priority
2282c393a42Smrgorder -- results of comparing earlier elements of this list weigh more
2292c393a42Smrgheavily than later elements.
2302c393a42Smrg    </P
2312c393a42Smrg><P
2322c393a42Smrg>There is one special case to this rule; family names are split into two
2332c393a42Smrgbindings; strong and weak.  Strong family names are given greater precedence
2342c393a42Smrgin the match than lang elements while weak family names are given lower
2352c393a42Smrgprecedence than lang elements.  This permits the document language to drive
2362c393a42Smrgfont selection when any document specified font is unavailable.
2372c393a42Smrg    </P
2382c393a42Smrg><P
2392c393a42Smrg>The pattern representing that font is augmented to include any properties
2402c393a42Smrgfound in the pattern but not found in the font itself; this permits the
2412c393a42Smrgapplication to pass rendering instructions or any other data through the
2422c393a42Smrgmatching system.  Finally, the list of editing instructions specific to
2432c393a42Smrgfonts found in the configuration are applied to the pattern.  This modified
2442c393a42Smrgpattern is returned to the application.
2452c393a42Smrg    </P
2462c393a42Smrg><P
2472c393a42Smrg>The return value contains sufficient information to locate and rasterize the
2482c393a42Smrgfont, including the file name, pixel size and other rendering data.  As
2492c393a42Smrgnone of the information involved pertains to the FreeType library,
2502c393a42Smrgapplications are free to use any rasterization engine or even to take
2512c393a42Smrgthe identified font file and access it directly.
2522c393a42Smrg    </P
2532c393a42Smrg><P
2542c393a42Smrg>The match/edit sequences in the configuration are performed in two passes
2552c393a42Smrgbecause there are essentially two different operations necessary -- the
2562c393a42Smrgfirst is to modify how fonts are selected; aliasing families and adding
2572c393a42Smrgsuitable defaults.  The second is to modify how the selected fonts are
2582c393a42Smrgrasterized.  Those must apply to the selected font, not the original pattern
2592c393a42Smrgas false matches will often occur.
2602c393a42Smrg    </P
2612c393a42Smrg></DIV
2622c393a42Smrg><DIV
2632c393a42SmrgCLASS="REFSECT2"
2642c393a42Smrg><A
2652c393a42SmrgNAME="AEN36"
2662c393a42Smrg></A
2672c393a42Smrg><H3
2682c393a42Smrg>Font Names</H3
2692c393a42Smrg><P
2702c393a42Smrg>Fontconfig provides a textual representation for patterns that the library
2712c393a42Smrgcan both accept and generate.  The representation is in three parts, first a
2722c393a42Smrglist of family names, second a list of point sizes and finally a list of
2732c393a42Smrgadditional properties:
2742c393a42Smrg    </P
275a6844aabSmrg><TABLE
276a6844aabSmrgBORDER="0"
277a6844aabSmrgBGCOLOR="#E0E0E0"
278a6844aabSmrgWIDTH="100%"
279a6844aabSmrg><TR
280a6844aabSmrg><TD
2812c393a42Smrg><PRE
2822c393a42SmrgCLASS="PROGRAMLISTING"
283a6844aabSmrg>	&#60;families&#62;-&#60;point sizes&#62;:&#60;name1&#62;=&#60;values1&#62;:&#60;name2&#62;=&#60;values2&#62;...
2842c393a42Smrg    </PRE
285a6844aabSmrg></TD
286a6844aabSmrg></TR
287a6844aabSmrg></TABLE
2882c393a42Smrg><P
2892c393a42Smrg>Values in a list are separated with commas.  The name needn't include either
2902c393a42Smrgfamilies or point sizes; they can be elided.  In addition, there are
2912c393a42Smrgsymbolic constants that simultaneously indicate both a name and a value.
2922c393a42SmrgHere are some examples:
2932c393a42Smrg    </P
294a6844aabSmrg><TABLE
295a6844aabSmrgBORDER="0"
296a6844aabSmrgBGCOLOR="#E0E0E0"
297a6844aabSmrgWIDTH="100%"
298a6844aabSmrg><TR
299a6844aabSmrg><TD
3002c393a42Smrg><PRE
3012c393a42SmrgCLASS="PROGRAMLISTING"
3022c393a42Smrg>  Name                            Meaning
3032c393a42Smrg  ----------------------------------------------------------
3042c393a42Smrg  Times-12                        12 point Times Roman
3052c393a42Smrg  Times-12:bold                   12 point Times Bold
3062c393a42Smrg  Courier:italic                  Courier Italic in the default size
3072c393a42Smrg  Monospace:matrix=1 .1 0 1       The users preferred monospace font
3082c393a42Smrg                                  with artificial obliquing
3092c393a42Smrg    </PRE
310a6844aabSmrg></TD
311a6844aabSmrg></TR
312a6844aabSmrg></TABLE
3132c393a42Smrg><P
314ca08ab68Smrg>The '\', '-', ':' and ',' characters in family names must be preceded by a
3152c393a42Smrg'\' character to avoid having them misinterpreted. Similarly, values
316ca08ab68Smrgcontaining '\', '=', '_', ':' and ',' must also have them preceded by a
3172c393a42Smrg'\' character. The '\' characters are stripped out of the family name and
3182c393a42Smrgvalues as the font name is read.
3192c393a42Smrg    </P
3202c393a42Smrg></DIV
3212c393a42Smrg></DIV
3222c393a42Smrg><DIV
3232c393a42SmrgCLASS="REFSECT1"
3242c393a42Smrg><A
325ca08ab68SmrgNAME="DEBUG"
3262c393a42Smrg></A
3272c393a42Smrg><H2
3282c393a42Smrg>Debugging Applications</H2
3292c393a42Smrg><P
3302c393a42Smrg>To help diagnose font and applications problems, fontconfig is built with a
3312c393a42Smrglarge amount of internal debugging left enabled. It is controlled by means
3322c393a42Smrgof the FC_DEBUG environment variable. The value of this variable is
3332c393a42Smrginterpreted as a number, and each bit within that value controls different
3342c393a42Smrgdebugging messages.
3352c393a42Smrg  </P
336a6844aabSmrg><TABLE
337a6844aabSmrgBORDER="0"
338a6844aabSmrgBGCOLOR="#E0E0E0"
339a6844aabSmrgWIDTH="100%"
340a6844aabSmrg><TR
341a6844aabSmrg><TD
3422c393a42Smrg><PRE
3432c393a42SmrgCLASS="PROGRAMLISTING"
3442c393a42Smrg>  Name         Value    Meaning
3452c393a42Smrg  ---------------------------------------------------------
3462c393a42Smrg  MATCH            1    Brief information about font matching
3472c393a42Smrg  MATCHV           2    Extensive font matching information
3482c393a42Smrg  EDIT             4    Monitor match/test/edit execution
3492c393a42Smrg  FONTSET          8    Track loading of font information at startup
3502c393a42Smrg  CACHE           16    Watch cache files being written
3512c393a42Smrg  CACHEV          32    Extensive cache file writing information
3522c393a42Smrg  PARSE           64    (no longer in use)
3532c393a42Smrg  SCAN           128    Watch font files being scanned to build caches
3542c393a42Smrg  SCANV          256    Verbose font file scanning information
3552c393a42Smrg  MEMORY         512    Monitor fontconfig memory usage
3562c393a42Smrg  CONFIG        1024    Monitor which config files are loaded
3572c393a42Smrg  LANGSET       2048    Dump char sets used to construct lang values
358953daebaSmrg  MATCH2        4096    Display font-matching transformation in patterns
3592c393a42Smrg  </PRE
360a6844aabSmrg></TD
361a6844aabSmrg></TR
362a6844aabSmrg></TABLE
3632c393a42Smrg><P
3642c393a42Smrg>Add the value of the desired debug levels together and assign that (in
3652c393a42Smrgbase 10) to the FC_DEBUG environment variable before running the
3662c393a42Smrgapplication. Output from these statements is sent to stdout.
3672c393a42Smrg  </P
3682c393a42Smrg></DIV
3692c393a42Smrg><DIV
3702c393a42SmrgCLASS="REFSECT1"
3712c393a42Smrg><A
3722c393a42SmrgNAME="AEN48"
3732c393a42Smrg></A
3742c393a42Smrg><H2
3752c393a42Smrg>Lang Tags</H2
3762c393a42Smrg><P
3772c393a42Smrg>Each font in the database contains a list of languages it supports.  This is
3782c393a42Smrgcomputed by comparing the Unicode coverage of the font with the orthography
3792c393a42Smrgof each language.  Languages are tagged using an RFC-3066 compatible naming
3802c393a42Smrgand occur in two parts -- the ISO 639 language tag followed a hyphen and then
3812c393a42Smrgby the ISO 3166 country code.  The hyphen and country code may be elided.
3822c393a42Smrg  </P
3832c393a42Smrg><P
3842c393a42Smrg>Fontconfig has orthographies for several languages built into the library.
3852c393a42SmrgNo provision has been made for adding new ones aside from rebuilding the
3862c393a42Smrglibrary.  It currently supports 122 of the 139 languages named in ISO 639-1,
3872c393a42Smrg141 of the languages with two-letter codes from ISO 639-2 and another 30
3882c393a42Smrglanguages with only three-letter codes.  Languages with both two and three
3892c393a42Smrgletter codes are provided with only the two letter code.
3902c393a42Smrg  </P
3912c393a42Smrg><P
3922c393a42Smrg>For languages used in multiple territories with radically different
3932c393a42Smrgcharacter sets, fontconfig includes per-territory orthographies.  This
3942c393a42Smrgincludes Azerbaijani, Kurdish, Pashto, Tigrinya and Chinese.
3952c393a42Smrg  </P
3962c393a42Smrg></DIV
3972c393a42Smrg><DIV
3982c393a42SmrgCLASS="REFSECT1"
3992c393a42Smrg><A
4002c393a42SmrgNAME="AEN53"
4012c393a42Smrg></A
4022c393a42Smrg><H2
4032c393a42Smrg>Configuration File Format</H2
4042c393a42Smrg><P
4052c393a42Smrg>Configuration files for fontconfig are stored in XML format; this
4062c393a42Smrgformat makes external configuration tools easier to write and ensures that
4072c393a42Smrgthey will generate syntactically correct configuration files.  As XML
4082c393a42Smrgfiles are plain text, they can also be manipulated by the expert user using
4092c393a42Smrga text editor.
4102c393a42Smrg  </P
4112c393a42Smrg><P
4122c393a42Smrg>The fontconfig document type definition resides in the external entity
4132c393a42Smrg"fonts.dtd"; this is normally stored in the default font configuration
4142c393a42Smrgdirectory (/etc/fonts).  Each configuration file should contain the
4152c393a42Smrgfollowing structure:
416a6844aabSmrg    <TABLE
417a6844aabSmrgBORDER="0"
418a6844aabSmrgBGCOLOR="#E0E0E0"
419a6844aabSmrgWIDTH="100%"
420a6844aabSmrg><TR
421a6844aabSmrg><TD
422a6844aabSmrg><PRE
4232c393a42SmrgCLASS="PROGRAMLISTING"
424a6844aabSmrg>	&#60;?xml version="1.0"?&#62;
425a6844aabSmrg	&#60;!DOCTYPE fontconfig SYSTEM "fonts.dtd"&#62;
426a6844aabSmrg	&#60;fontconfig&#62;
4272c393a42Smrg	...
428a6844aabSmrg	&#60;/fontconfig&#62;
4292c393a42Smrg    </PRE
430a6844aabSmrg></TD
431a6844aabSmrg></TR
432a6844aabSmrg></TABLE
4332c393a42Smrg>
4342c393a42Smrg  </P
4352c393a42Smrg><DIV
4362c393a42SmrgCLASS="REFSECT2"
4372c393a42Smrg><A
4382c393a42SmrgNAME="AEN58"
4392c393a42Smrg></A
4402c393a42Smrg><H3
4412c393a42Smrg><TT
4422c393a42SmrgCLASS="LITERAL"
443a6844aabSmrg>&#60;fontconfig&#62;</TT
4442c393a42Smrg></H3
4452c393a42Smrg><P
4462c393a42Smrg>This is the top level element for a font configuration and can contain
4472c393a42Smrg<TT
4482c393a42SmrgCLASS="LITERAL"
449a6844aabSmrg>&#60;dir&#62;</TT
4502c393a42Smrg>, <TT
4512c393a42SmrgCLASS="LITERAL"
452ca08ab68Smrg>&#60;cachedir&#62;</TT
4532c393a42Smrg>, <TT
4542c393a42SmrgCLASS="LITERAL"
455a6844aabSmrg>&#60;include&#62;</TT
4562c393a42Smrg>, <TT
4572c393a42SmrgCLASS="LITERAL"
458a6844aabSmrg>&#60;match&#62;</TT
4592c393a42Smrg> and <TT
4602c393a42SmrgCLASS="LITERAL"
461a6844aabSmrg>&#60;alias&#62;</TT
4622c393a42Smrg> elements in any order.
4632c393a42Smrg  </P
4642c393a42Smrg></DIV
4652c393a42Smrg><DIV
4662c393a42SmrgCLASS="REFSECT2"
4672c393a42Smrg><A
4682c393a42SmrgNAME="AEN67"
4692c393a42Smrg></A
4702c393a42Smrg><H3
4712c393a42Smrg><TT
4722c393a42SmrgCLASS="LITERAL"
473ca08ab68Smrg>&#60;dir prefix="default"&#62;</TT
4742c393a42Smrg></H3
4752c393a42Smrg><P
4762c393a42Smrg>This element contains a directory name which will be scanned for font files
477ca08ab68Smrgto include in the set of available fonts. 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.
4782c393a42Smrg  </P
4792c393a42Smrg></DIV
4802c393a42Smrg><DIV
4812c393a42SmrgCLASS="REFSECT2"
4822c393a42Smrg><A
4832c393a42SmrgNAME="AEN71"
4842c393a42Smrg></A
4852c393a42Smrg><H3
4862c393a42Smrg><TT
4872c393a42SmrgCLASS="LITERAL"
488ca08ab68Smrg>&#60;cachedir prefix="default"&#62;</TT
4892c393a42Smrg></H3
4902c393a42Smrg><P
491ca08ab68Smrg>This element contains a directory name that is supposed to be stored or read
492ca08ab68Smrgthe cache of font information.  If multiple elements are specified in
493ca08ab68Smrgthe configuration file, the directory that can be accessed first in the list
494ca08ab68Smrgwill be used to store the cache files.  If it starts with '~', it refers to
495ca08ab68Smrga 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.
496ca08ab68SmrgThe default directory is ``$XDG_CACHE_HOME/fontconfig'' and it contains the cache files
497ca08ab68Smrgnamed ``<TT
4982c393a42SmrgCLASS="LITERAL"
499ca08ab68Smrg>&#60;hash value&#62;</TT
500ca08ab68Smrg>-<TT
501ca08ab68SmrgCLASS="LITERAL"
502ca08ab68Smrg>&#60;architecture&#62;</TT
503ca08ab68Smrg>.cache-<TT
504ca08ab68SmrgCLASS="LITERAL"
505953daebaSmrg>&#60;version&#62;</TT
506ca08ab68Smrg>'',
507ca08ab68Smrgwhere <TT
5082c393a42SmrgCLASS="LITERAL"
509a6844aabSmrg>&#60;version&#62;</TT
510953daebaSmrg> is the fontconfig cache file
511953daebaSmrgversion number (currently 7).
5122c393a42Smrg  </P
5132c393a42Smrg></DIV
5142c393a42Smrg><DIV
5152c393a42SmrgCLASS="REFSECT2"
5162c393a42Smrg><A
517ca08ab68SmrgNAME="AEN79"
5182c393a42Smrg></A
5192c393a42Smrg><H3
5202c393a42Smrg><TT
5212c393a42SmrgCLASS="LITERAL"
522ca08ab68Smrg>&#60;include ignore_missing="no" prefix="default"&#62;</TT
5232c393a42Smrg></H3
5242c393a42Smrg><P
5252c393a42Smrg>This element contains the name of an additional configuration file or
5262c393a42Smrgdirectory.  If a directory, every file within that directory starting with an
5272c393a42SmrgASCII digit (U+0030 - U+0039) and ending with the string ``.conf'' will be processed in sorted order.  When
5282c393a42Smrgthe XML datatype is traversed by FcConfigParse, the contents of the file(s)
5292c393a42Smrgwill also be incorporated into the configuration by passing the filename(s) to
5302c393a42SmrgFcConfigLoadAndParse.  If 'ignore_missing' is set to "yes" instead of the
5312c393a42Smrgdefault "no", a missing file or directory will elicit no warning message from
532ca08ab68Smrgthe 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.
5332c393a42Smrg  </P
5342c393a42Smrg></DIV
5352c393a42Smrg><DIV
5362c393a42SmrgCLASS="REFSECT2"
5372c393a42Smrg><A
538ca08ab68SmrgNAME="AEN83"
5392c393a42Smrg></A
5402c393a42Smrg><H3
5412c393a42Smrg><TT
5422c393a42SmrgCLASS="LITERAL"
543a6844aabSmrg>&#60;config&#62;</TT
5442c393a42Smrg></H3
5452c393a42Smrg><P
5462c393a42Smrg>This element provides a place to consolidate additional configuration
5472c393a42Smrginformation.  <TT
5482c393a42SmrgCLASS="LITERAL"
549a6844aabSmrg>&#60;config&#62;</TT
5502c393a42Smrg> can contain <TT
5512c393a42SmrgCLASS="LITERAL"
552a6844aabSmrg>&#60;blank&#62;</TT
5532c393a42Smrg> and <TT
5542c393a42SmrgCLASS="LITERAL"
555a6844aabSmrg>&#60;rescan&#62;</TT
5562c393a42Smrg> elements in any
5572c393a42Smrgorder.
5582c393a42Smrg  </P
5592c393a42Smrg></DIV
5602c393a42Smrg><DIV
5612c393a42SmrgCLASS="REFSECT2"
5622c393a42Smrg><A
563ca08ab68SmrgNAME="AEN90"
5642c393a42Smrg></A
5652c393a42Smrg><H3
5662c393a42Smrg><TT
5672c393a42SmrgCLASS="LITERAL"
568a6844aabSmrg>&#60;blank&#62;</TT
5692c393a42Smrg></H3
5702c393a42Smrg><P
5712c393a42Smrg>Fonts often include "broken" glyphs which appear in the encoding but are
5722c393a42Smrgdrawn as blanks on the screen.  Within the <TT
5732c393a42SmrgCLASS="LITERAL"
574a6844aabSmrg>&#60;blank&#62;</TT
5752c393a42Smrg> element, place each
5762c393a42SmrgUnicode characters which is supposed to be blank in an <TT
5772c393a42SmrgCLASS="LITERAL"
578a6844aabSmrg>&#60;int&#62;</TT
5792c393a42Smrg> element.
5802c393a42SmrgCharacters outside of this set which are drawn as blank will be elided from
5812c393a42Smrgthe set of characters supported by the font.
5822c393a42Smrg  </P
5832c393a42Smrg></DIV
5842c393a42Smrg><DIV
5852c393a42SmrgCLASS="REFSECT2"
5862c393a42Smrg><A
587ca08ab68SmrgNAME="AEN96"
5882c393a42Smrg></A
5892c393a42Smrg><H3
5902c393a42Smrg><TT
5912c393a42SmrgCLASS="LITERAL"
592a6844aabSmrg>&#60;rescan&#62;</TT
5932c393a42Smrg></H3
5942c393a42Smrg><P
5952c393a42Smrg>The <TT
5962c393a42SmrgCLASS="LITERAL"
597a6844aabSmrg>&#60;rescan&#62;</TT
5982c393a42Smrg> element holds an <TT
5992c393a42SmrgCLASS="LITERAL"
600a6844aabSmrg>&#60;int&#62;</TT
6012c393a42Smrg> element which indicates the default
6022c393a42Smrginterval between automatic checks for font configuration changes.
6032c393a42SmrgFontconfig will validate all of the configuration files and directories and
6042c393a42Smrgautomatically rebuild the internal datastructures when this interval passes.
6052c393a42Smrg  </P
6062c393a42Smrg></DIV
6072c393a42Smrg><DIV
6082c393a42SmrgCLASS="REFSECT2"
6092c393a42Smrg><A
610ca08ab68SmrgNAME="AEN102"
6112c393a42Smrg></A
6122c393a42Smrg><H3
6132c393a42Smrg><TT
6142c393a42SmrgCLASS="LITERAL"
615a6844aabSmrg>&#60;selectfont&#62;</TT
6162c393a42Smrg></H3
6172c393a42Smrg><P
6182c393a42Smrg>This element is used to black/white list fonts from being listed or matched
6192c393a42Smrgagainst.  It holds acceptfont and rejectfont elements.
6202c393a42Smrg  </P
6212c393a42Smrg></DIV
6222c393a42Smrg><DIV
6232c393a42SmrgCLASS="REFSECT2"
6242c393a42Smrg><A
625ca08ab68SmrgNAME="AEN106"
6262c393a42Smrg></A
6272c393a42Smrg><H3
6282c393a42Smrg><TT
6292c393a42SmrgCLASS="LITERAL"
630a6844aabSmrg>&#60;acceptfont&#62;</TT
6312c393a42Smrg></H3
6322c393a42Smrg><P
6332c393a42Smrg>Fonts matched by an acceptfont element are "whitelisted"; such fonts are
6342c393a42Smrgexplicitly included in the set of fonts used to resolve list and match
6352c393a42Smrgrequests; including them in this list protects them from being "blacklisted"
6362c393a42Smrgby a rejectfont element.  Acceptfont elements include glob and pattern
6372c393a42Smrgelements which are used to match fonts.
6382c393a42Smrg  </P
6392c393a42Smrg></DIV
6402c393a42Smrg><DIV
6412c393a42SmrgCLASS="REFSECT2"
6422c393a42Smrg><A
643ca08ab68SmrgNAME="AEN110"
6442c393a42Smrg></A
6452c393a42Smrg><H3
6462c393a42Smrg><TT
6472c393a42SmrgCLASS="LITERAL"
648a6844aabSmrg>&#60;rejectfont&#62;</TT
6492c393a42Smrg></H3
6502c393a42Smrg><P
6512c393a42Smrg>Fonts matched by an rejectfont element are "blacklisted"; such fonts are
6522c393a42Smrgexcluded from the set of fonts used to resolve list and match requests as if
6532c393a42Smrgthey didn't exist in the system.  Rejectfont elements include glob and
6542c393a42Smrgpattern elements which are used to match fonts.
6552c393a42Smrg  </P
6562c393a42Smrg></DIV
6572c393a42Smrg><DIV
6582c393a42SmrgCLASS="REFSECT2"
6592c393a42Smrg><A
660ca08ab68SmrgNAME="AEN114"
6612c393a42Smrg></A
6622c393a42Smrg><H3
6632c393a42Smrg><TT
6642c393a42SmrgCLASS="LITERAL"
665a6844aabSmrg>&#60;glob&#62;</TT
6662c393a42Smrg></H3
6672c393a42Smrg><P
6682c393a42Smrg>Glob elements hold shell-style filename matching patterns (including ? and
6692c393a42Smrg*) which match fonts based on their complete pathnames.  This can be used to
6702c393a42Smrgexclude a set of directories (/usr/share/fonts/uglyfont*), or particular
6712c393a42Smrgfont file types (*.pcf.gz), but the latter mechanism relies rather heavily
6722c393a42Smrgon filenaming conventions which can't be relied upon.  Note that globs
6732c393a42Smrgonly apply to directories, not to individual fonts.
6742c393a42Smrg  </P
6752c393a42Smrg></DIV
6762c393a42Smrg><DIV
6772c393a42SmrgCLASS="REFSECT2"
6782c393a42Smrg><A
679ca08ab68SmrgNAME="AEN118"
6802c393a42Smrg></A
6812c393a42Smrg><H3
6822c393a42Smrg><TT
6832c393a42SmrgCLASS="LITERAL"
684a6844aabSmrg>&#60;pattern&#62;</TT
6852c393a42Smrg></H3
6862c393a42Smrg><P
6872c393a42Smrg>Pattern elements perform list-style matching on incoming fonts; that is,
6882c393a42Smrgthey hold a list of elements and associated values.  If all of those
6892c393a42Smrgelements have a matching value, then the pattern matches the font.  This can
6902c393a42Smrgbe used to select fonts based on attributes of the font (scalable, bold,
6912c393a42Smrgetc), which is a more reliable mechanism than using file extensions.
6922c393a42SmrgPattern elements include patelt elements.
6932c393a42Smrg  </P
6942c393a42Smrg></DIV
6952c393a42Smrg><DIV
6962c393a42SmrgCLASS="REFSECT2"
6972c393a42Smrg><A
698ca08ab68SmrgNAME="AEN122"
6992c393a42Smrg></A
7002c393a42Smrg><H3
7012c393a42Smrg><TT
7022c393a42SmrgCLASS="LITERAL"
703a6844aabSmrg>&#60;patelt name="property"&#62;</TT
7042c393a42Smrg></H3
7052c393a42Smrg><P
7062c393a42Smrg>Patelt elements hold a single pattern element and list of values.  They must
7072c393a42Smrghave a 'name' attribute which indicates the pattern element name.  Patelt
7082c393a42Smrgelements include int, double, string, matrix, bool, charset and const
7092c393a42Smrgelements.
7102c393a42Smrg  </P
7112c393a42Smrg></DIV
7122c393a42Smrg><DIV
7132c393a42SmrgCLASS="REFSECT2"
7142c393a42Smrg><A
715ca08ab68SmrgNAME="AEN126"
7162c393a42Smrg></A
7172c393a42Smrg><H3
7182c393a42Smrg><TT
7192c393a42SmrgCLASS="LITERAL"
720a6844aabSmrg>&#60;match target="pattern"&#62;</TT
7212c393a42Smrg></H3
7222c393a42Smrg><P
7232c393a42Smrg>This element holds first a (possibly empty) list of <TT
7242c393a42SmrgCLASS="LITERAL"
725a6844aabSmrg>&#60;test&#62;</TT
7262c393a42Smrg> elements and then
7272c393a42Smrga (possibly empty) list of <TT
7282c393a42SmrgCLASS="LITERAL"
729a6844aabSmrg>&#60;edit&#62;</TT
7302c393a42Smrg> elements.  Patterns which match all of the
7312c393a42Smrgtests are subjected to all the edits.  If 'target' is set to "font" instead
7322c393a42Smrgof the default "pattern", then this element applies to the font name
7332c393a42Smrgresulting from a match rather than a font pattern to be matched. If 'target'
7342c393a42Smrgis set to "scan", then this element applies when the font is scanned to
7352c393a42Smrgbuild the fontconfig database.
7362c393a42Smrg  </P
7372c393a42Smrg></DIV
7382c393a42Smrg><DIV
7392c393a42SmrgCLASS="REFSECT2"
7402c393a42Smrg><A
741ca08ab68SmrgNAME="AEN132"
7422c393a42Smrg></A
7432c393a42Smrg><H3
7442c393a42Smrg><TT
7452c393a42SmrgCLASS="LITERAL"
746a6844aabSmrg>&#60;test qual="any" name="property" target="default" compare="eq"&#62;</TT
7472c393a42Smrg></H3
7482c393a42Smrg><P
7492c393a42Smrg>This element contains a single value which is compared with the target
7502c393a42Smrg('pattern', 'font', 'scan' or 'default') property "property" (substitute any of the property names seen 
751ca08ab68Smrgabove). 'compare' can be one of "eq", "not_eq", "less", "less_eq", "more", "more_eq", "contains" or
752ca08ab68Smrg"not_contains".  'qual' may either be the default, "any", in which case the match
7532c393a42Smrgsucceeds if any value associated with the property matches the test value, or
7542c393a42Smrg"all", in which case all of the values associated with the property must
755ca08ab68Smrgmatch 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".
756ca08ab68SmrgWhen used in a &#60;match target="font"&#62; element,
757a6844aabSmrgthe target= attribute in the &#60;test&#62; element selects between matching
7582c393a42Smrgthe original pattern or the font.  "default" selects whichever target the
759a6844aabSmrgouter &#60;match&#62; element has selected.
7602c393a42Smrg  </P
7612c393a42Smrg></DIV
7622c393a42Smrg><DIV
7632c393a42SmrgCLASS="REFSECT2"
7642c393a42Smrg><A
765ca08ab68SmrgNAME="AEN136"
7662c393a42Smrg></A
7672c393a42Smrg><H3
7682c393a42Smrg><TT
7692c393a42SmrgCLASS="LITERAL"
770a6844aabSmrg>&#60;edit name="property" mode="assign" binding="weak"&#62;</TT
7712c393a42Smrg></H3
7722c393a42Smrg><P
7732c393a42Smrg>This element contains a list of expression elements (any of the value or
7742c393a42Smrgoperator elements).  The expression elements are evaluated at run-time and
7752c393a42Smrgmodify the property "property".  The modification depends on whether
7762c393a42Smrg"property" was matched by one of the associated <TT
7772c393a42SmrgCLASS="LITERAL"
778a6844aabSmrg>&#60;test&#62;</TT
7792c393a42Smrg> elements, if so, the
7802c393a42Smrgmodification may affect the first matched value.  Any values inserted into
7812c393a42Smrgthe property are given the indicated binding ("strong", "weak" or "same")
7822c393a42Smrgwith "same" binding using the value from the matched pattern element.
7832c393a42Smrg'mode' is one of:
784a6844aabSmrg    <TABLE
785a6844aabSmrgBORDER="0"
786a6844aabSmrgBGCOLOR="#E0E0E0"
787a6844aabSmrgWIDTH="100%"
788a6844aabSmrg><TR
789a6844aabSmrg><TD
790a6844aabSmrg><PRE
7912c393a42SmrgCLASS="PROGRAMLISTING"
7922c393a42Smrg>  Mode                    With Match              Without Match
7932c393a42Smrg  ---------------------------------------------------------------------
7942c393a42Smrg  "assign"                Replace matching value  Replace all values
7952c393a42Smrg  "assign_replace"        Replace all values      Replace all values
7962c393a42Smrg  "prepend"               Insert before matching  Insert at head of list
7972c393a42Smrg  "prepend_first"         Insert at head of list  Insert at head of list
7982c393a42Smrg  "append"                Append after matching   Append at end of list
7992c393a42Smrg  "append_last"           Append at end of list   Append at end of list
800c9710b42Smrg  "delete"                Delete matching value   Delete all values
801c9710b42Smrg  "delete_all"            Delete all values       Delete all values
8022c393a42Smrg    </PRE
803a6844aabSmrg></TD
804a6844aabSmrg></TR
805a6844aabSmrg></TABLE
8062c393a42Smrg>
8072c393a42Smrg  </P
8082c393a42Smrg></DIV
8092c393a42Smrg><DIV
8102c393a42SmrgCLASS="REFSECT2"
8112c393a42Smrg><A
812ca08ab68SmrgNAME="AEN142"
8132c393a42Smrg></A
8142c393a42Smrg><H3
8152c393a42Smrg><TT
8162c393a42SmrgCLASS="LITERAL"
817a6844aabSmrg>&#60;int&#62;</TT
8182c393a42Smrg>, <TT
8192c393a42SmrgCLASS="LITERAL"
820a6844aabSmrg>&#60;double&#62;</TT
8212c393a42Smrg>, <TT
8222c393a42SmrgCLASS="LITERAL"
823a6844aabSmrg>&#60;string&#62;</TT
8242c393a42Smrg>, <TT
8252c393a42SmrgCLASS="LITERAL"
826a6844aabSmrg>&#60;bool&#62;</TT
8272c393a42Smrg></H3
8282c393a42Smrg><P
8292c393a42Smrg>These elements hold a single value of the indicated type.  <TT
8302c393a42SmrgCLASS="LITERAL"
831a6844aabSmrg>&#60;bool&#62;</TT
8322c393a42Smrg>
8332c393a42Smrgelements hold either true or false.  An important limitation exists in
8342c393a42Smrgthe parsing of floating point numbers -- fontconfig requires that
8352c393a42Smrgthe mantissa start with a digit, not a decimal point, so insert a leading
8362c393a42Smrgzero for purely fractional values (e.g. use 0.5 instead of .5 and -0.5
8372c393a42Smrginstead of -.5).
8382c393a42Smrg  </P
8392c393a42Smrg></DIV
8402c393a42Smrg><DIV
8412c393a42SmrgCLASS="REFSECT2"
8422c393a42Smrg><A
843ca08ab68SmrgNAME="AEN150"
8442c393a42Smrg></A
8452c393a42Smrg><H3
8462c393a42Smrg><TT
8472c393a42SmrgCLASS="LITERAL"
848a6844aabSmrg>&#60;matrix&#62;</TT
8492c393a42Smrg></H3
8502c393a42Smrg><P
851c9710b42Smrg>This element holds four numerical expressions of an affine transformation.
852c9710b42SmrgAt their simplest these will be four <TT
8532c393a42SmrgCLASS="LITERAL"
854a6844aabSmrg>&#60;double&#62;</TT
855c9710b42Smrg> elements
856c9710b42Smrgbut they can also be more involved expressions.
8572c393a42Smrg  </P
8582c393a42Smrg></DIV
8592c393a42Smrg><DIV
8602c393a42SmrgCLASS="REFSECT2"
8612c393a42Smrg><A
862ca08ab68SmrgNAME="AEN155"
863ca08ab68Smrg></A
864ca08ab68Smrg><H3
865ca08ab68Smrg><TT
866ca08ab68SmrgCLASS="LITERAL"
867ca08ab68Smrg>&#60;range&#62;</TT
868ca08ab68Smrg></H3
869ca08ab68Smrg><P
870ca08ab68Smrg>This element holds the two <TT
871ca08ab68SmrgCLASS="LITERAL"
872ca08ab68Smrg>&#60;int&#62;</TT
873ca08ab68Smrg> elements of a range
874ca08ab68Smrgrepresentation.
875ca08ab68Smrg  </P
876ca08ab68Smrg></DIV
877ca08ab68Smrg><DIV
878ca08ab68SmrgCLASS="REFSECT2"
879ca08ab68Smrg><A
880ca08ab68SmrgNAME="AEN160"
881ca08ab68Smrg></A
882ca08ab68Smrg><H3
883ca08ab68Smrg><TT
884ca08ab68SmrgCLASS="LITERAL"
885ca08ab68Smrg>&#60;charset&#62;</TT
886ca08ab68Smrg></H3
887ca08ab68Smrg><P
888ca08ab68Smrg>This element holds at least one <TT
889ca08ab68SmrgCLASS="LITERAL"
890ca08ab68Smrg>&#60;int&#62;</TT
891ca08ab68Smrg> element of
892ca08ab68Smrgan Unicode code point or more.
893ca08ab68Smrg  </P
894ca08ab68Smrg></DIV
895ca08ab68Smrg><DIV
896ca08ab68SmrgCLASS="REFSECT2"
897ca08ab68Smrg><A
898ca08ab68SmrgNAME="AEN165"
899ca08ab68Smrg></A
900ca08ab68Smrg><H3
901ca08ab68Smrg><TT
902ca08ab68SmrgCLASS="LITERAL"
903ca08ab68Smrg>&#60;langset&#62;</TT
904ca08ab68Smrg></H3
905ca08ab68Smrg><P
906ca08ab68Smrg>This element holds at least one <TT
907ca08ab68SmrgCLASS="LITERAL"
908ca08ab68Smrg>&#60;string&#62;</TT
909ca08ab68Smrg> element of
910ca08ab68Smrga RFC-3066-style languages or more.
911ca08ab68Smrg  </P
912ca08ab68Smrg></DIV
913ca08ab68Smrg><DIV
914ca08ab68SmrgCLASS="REFSECT2"
915ca08ab68Smrg><A
916ca08ab68SmrgNAME="AEN170"
9172c393a42Smrg></A
9182c393a42Smrg><H3
9192c393a42Smrg><TT
9202c393a42SmrgCLASS="LITERAL"
921a6844aabSmrg>&#60;name&#62;</TT
9222c393a42Smrg></H3
9232c393a42Smrg><P
9242c393a42Smrg>Holds a property name.  Evaluates to the first value from the property of
925c9710b42Smrgthe pattern.  If the 'target' attribute is not present, it will default to
926c9710b42Smrg'default', in which case the property is returned from the font pattern
927c9710b42Smrgduring a target="font" match, and to the pattern during a target="pattern"
928c9710b42Smrgmatch.  The attribute can also take the values 'font' or 'pattern' to
929c9710b42Smrgexplicitly choose which pattern to use.  It is an error to use a target
930c9710b42Smrgof 'font' in a match that has target="pattern".
9312c393a42Smrg  </P
9322c393a42Smrg></DIV
9332c393a42Smrg><DIV
9342c393a42SmrgCLASS="REFSECT2"
9352c393a42Smrg><A
936ca08ab68SmrgNAME="AEN174"
9372c393a42Smrg></A
9382c393a42Smrg><H3
9392c393a42Smrg><TT
9402c393a42SmrgCLASS="LITERAL"
941a6844aabSmrg>&#60;const&#62;</TT
9422c393a42Smrg></H3
9432c393a42Smrg><P
9442c393a42Smrg>Holds the name of a constant; these are always integers and serve as
9452c393a42Smrgsymbolic names for common font values:
946a6844aabSmrg    <TABLE
947a6844aabSmrgBORDER="0"
948a6844aabSmrgBGCOLOR="#E0E0E0"
949a6844aabSmrgWIDTH="100%"
950a6844aabSmrg><TR
951a6844aabSmrg><TD
952a6844aabSmrg><PRE
9532c393a42SmrgCLASS="PROGRAMLISTING"
9542c393a42Smrg>  Constant        Property        Value
9552c393a42Smrg  -------------------------------------
9562c393a42Smrg  thin            weight          0
9572c393a42Smrg  extralight      weight          40
9582c393a42Smrg  ultralight      weight          40
9592c393a42Smrg  light           weight          50
960953daebaSmrg  demilight       weight          55
961953daebaSmrg  semilight       weight          55
9622c393a42Smrg  book            weight          75
9632c393a42Smrg  regular         weight          80
9642c393a42Smrg  normal          weight          80
9652c393a42Smrg  medium          weight          100
9662c393a42Smrg  demibold        weight          180
9672c393a42Smrg  semibold        weight          180
9682c393a42Smrg  bold            weight          200
9692c393a42Smrg  extrabold       weight          205
9702c393a42Smrg  black           weight          210
9712c393a42Smrg  heavy           weight          210
9722c393a42Smrg  roman           slant           0
9732c393a42Smrg  italic          slant           100
9742c393a42Smrg  oblique         slant           110
9752c393a42Smrg  ultracondensed  width           50
9762c393a42Smrg  extracondensed  width           63
9772c393a42Smrg  condensed       width           75
9782c393a42Smrg  semicondensed   width           87
9792c393a42Smrg  normal          width           100
9802c393a42Smrg  semiexpanded    width           113
9812c393a42Smrg  expanded        width           125
9822c393a42Smrg  extraexpanded   width           150
9832c393a42Smrg  ultraexpanded   width           200
9842c393a42Smrg  proportional    spacing         0
9852c393a42Smrg  dual            spacing         90
9862c393a42Smrg  mono            spacing         100
9872c393a42Smrg  charcell        spacing         110
9882c393a42Smrg  unknown         rgba            0
9892c393a42Smrg  rgb             rgba            1
9902c393a42Smrg  bgr             rgba            2
9912c393a42Smrg  vrgb            rgba            3
9922c393a42Smrg  vbgr            rgba            4
9932c393a42Smrg  none            rgba            5
9942c393a42Smrg  lcdnone         lcdfilter       0
9952c393a42Smrg  lcddefault      lcdfilter       1
9962c393a42Smrg  lcdlight        lcdfilter       2
9972c393a42Smrg  lcdlegacy       lcdfilter       3
9982c393a42Smrg  hintnone        hintstyle       0
9992c393a42Smrg  hintslight      hintstyle       1
10002c393a42Smrg  hintmedium      hintstyle       2
10012c393a42Smrg  hintfull        hintstyle       3
10022c393a42Smrg    </PRE
1003a6844aabSmrg></TD
1004a6844aabSmrg></TR
1005a6844aabSmrg></TABLE
10062c393a42Smrg>
10072c393a42Smrg      </P
10082c393a42Smrg></DIV
10092c393a42Smrg><DIV
10102c393a42SmrgCLASS="REFSECT2"
10112c393a42Smrg><A
1012ca08ab68SmrgNAME="AEN179"
10132c393a42Smrg></A
10142c393a42Smrg><H3
10152c393a42Smrg><TT
10162c393a42SmrgCLASS="LITERAL"
1017a6844aabSmrg>&#60;or&#62;</TT
10182c393a42Smrg>, <TT
10192c393a42SmrgCLASS="LITERAL"
1020a6844aabSmrg>&#60;and&#62;</TT
10212c393a42Smrg>, <TT
10222c393a42SmrgCLASS="LITERAL"
1023a6844aabSmrg>&#60;plus&#62;</TT
10242c393a42Smrg>, <TT
10252c393a42SmrgCLASS="LITERAL"
1026a6844aabSmrg>&#60;minus&#62;</TT
10272c393a42Smrg>, <TT
10282c393a42SmrgCLASS="LITERAL"
1029a6844aabSmrg>&#60;times&#62;</TT
10302c393a42Smrg>, <TT
10312c393a42SmrgCLASS="LITERAL"
1032a6844aabSmrg>&#60;divide&#62;</TT
10332c393a42Smrg></H3
10342c393a42Smrg><P
10352c393a42Smrg>These elements perform the specified operation on a list of expression
10362c393a42Smrgelements.  <TT
10372c393a42SmrgCLASS="LITERAL"
1038a6844aabSmrg>&#60;or&#62;</TT
10392c393a42Smrg> and <TT
10402c393a42SmrgCLASS="LITERAL"
1041a6844aabSmrg>&#60;and&#62;</TT
10422c393a42Smrg> are boolean, not bitwise.
10432c393a42Smrg      </P
10442c393a42Smrg></DIV
10452c393a42Smrg><DIV
10462c393a42SmrgCLASS="REFSECT2"
10472c393a42Smrg><A
1048ca08ab68SmrgNAME="AEN190"
10492c393a42Smrg></A
10502c393a42Smrg><H3
10512c393a42Smrg><TT
10522c393a42SmrgCLASS="LITERAL"
1053a6844aabSmrg>&#60;eq&#62;</TT
10542c393a42Smrg>, <TT
10552c393a42SmrgCLASS="LITERAL"
1056a6844aabSmrg>&#60;not_eq&#62;</TT
10572c393a42Smrg>, <TT
10582c393a42SmrgCLASS="LITERAL"
1059a6844aabSmrg>&#60;less&#62;</TT
10602c393a42Smrg>, <TT
10612c393a42SmrgCLASS="LITERAL"
1062a6844aabSmrg>&#60;less_eq&#62;</TT
10632c393a42Smrg>, <TT
10642c393a42SmrgCLASS="LITERAL"
1065a6844aabSmrg>&#60;more&#62;</TT
10662c393a42Smrg>, <TT
10672c393a42SmrgCLASS="LITERAL"
1068a6844aabSmrg>&#60;more_eq&#62;</TT
1069ca08ab68Smrg>, <TT
1070ca08ab68SmrgCLASS="LITERAL"
1071ca08ab68Smrg>&#60;contains&#62;</TT
1072ca08ab68Smrg>, <TT
1073ca08ab68SmrgCLASS="LITERAL"
1074ca08ab68Smrg>&#60;not_contains</TT
10752c393a42Smrg></H3
10762c393a42Smrg><P
10772c393a42Smrg>These elements compare two values, producing a boolean result.
10782c393a42Smrg  </P
10792c393a42Smrg></DIV
10802c393a42Smrg><DIV
10812c393a42SmrgCLASS="REFSECT2"
10822c393a42Smrg><A
1083ca08ab68SmrgNAME="AEN201"
10842c393a42Smrg></A
10852c393a42Smrg><H3
10862c393a42Smrg><TT
10872c393a42SmrgCLASS="LITERAL"
1088a6844aabSmrg>&#60;not&#62;</TT
10892c393a42Smrg></H3
10902c393a42Smrg><P
10912c393a42Smrg>Inverts the boolean sense of its one expression element
10922c393a42Smrg  </P
10932c393a42Smrg></DIV
10942c393a42Smrg><DIV
10952c393a42SmrgCLASS="REFSECT2"
10962c393a42Smrg><A
1097ca08ab68SmrgNAME="AEN205"
10982c393a42Smrg></A
10992c393a42Smrg><H3
11002c393a42Smrg><TT
11012c393a42SmrgCLASS="LITERAL"
1102a6844aabSmrg>&#60;if&#62;</TT
11032c393a42Smrg></H3
11042c393a42Smrg><P
11052c393a42Smrg>This element takes three expression elements; if the value of the first is
11062c393a42Smrgtrue, it produces the value of the second, otherwise it produces the value
11072c393a42Smrgof the third.
11082c393a42Smrg  </P
11092c393a42Smrg></DIV
11102c393a42Smrg><DIV
11112c393a42SmrgCLASS="REFSECT2"
11122c393a42Smrg><A
1113ca08ab68SmrgNAME="AEN209"
11142c393a42Smrg></A
11152c393a42Smrg><H3
11162c393a42Smrg><TT
11172c393a42SmrgCLASS="LITERAL"
1118a6844aabSmrg>&#60;alias&#62;</TT
11192c393a42Smrg></H3
11202c393a42Smrg><P
11212c393a42Smrg>Alias elements provide a shorthand notation for the set of common match
11222c393a42Smrgoperations needed to substitute one font family for another.  They contain a
11232c393a42Smrg<TT
11242c393a42SmrgCLASS="LITERAL"
1125a6844aabSmrg>&#60;family&#62;</TT
11262c393a42Smrg> element followed by optional <TT
11272c393a42SmrgCLASS="LITERAL"
1128a6844aabSmrg>&#60;prefer&#62;</TT
11292c393a42Smrg>, <TT
11302c393a42SmrgCLASS="LITERAL"
1131a6844aabSmrg>&#60;accept&#62;</TT
11322c393a42Smrg> and <TT
11332c393a42SmrgCLASS="LITERAL"
1134a6844aabSmrg>&#60;default&#62;</TT
11352c393a42Smrg>
11362c393a42Smrgelements.  Fonts matching the <TT
11372c393a42SmrgCLASS="LITERAL"
1138a6844aabSmrg>&#60;family&#62;</TT
11392c393a42Smrg> element are edited to prepend the
11402c393a42Smrglist of <TT
11412c393a42SmrgCLASS="LITERAL"
1142a6844aabSmrg>&#60;prefer&#62;</TT
11432c393a42Smrg>ed families before the matching <TT
11442c393a42SmrgCLASS="LITERAL"
1145a6844aabSmrg>&#60;family&#62;</TT
11462c393a42Smrg>, append the
11472c393a42Smrg<TT
11482c393a42SmrgCLASS="LITERAL"
1149a6844aabSmrg>&#60;accept&#62;</TT
11502c393a42Smrg>able families after the matching <TT
11512c393a42SmrgCLASS="LITERAL"
1152a6844aabSmrg>&#60;family&#62;</TT
11532c393a42Smrg> and append the <TT
11542c393a42SmrgCLASS="LITERAL"
1155a6844aabSmrg>&#60;default&#62;</TT
11562c393a42Smrg>
11572c393a42Smrgfamilies to the end of the family list.
11582c393a42Smrg  </P
11592c393a42Smrg></DIV
11602c393a42Smrg><DIV
11612c393a42SmrgCLASS="REFSECT2"
11622c393a42Smrg><A
1163ca08ab68SmrgNAME="AEN223"
11642c393a42Smrg></A
11652c393a42Smrg><H3
11662c393a42Smrg><TT
11672c393a42SmrgCLASS="LITERAL"
1168a6844aabSmrg>&#60;family&#62;</TT
11692c393a42Smrg></H3
11702c393a42Smrg><P
11712c393a42Smrg>Holds a single font family name
11722c393a42Smrg  </P
11732c393a42Smrg></DIV
11742c393a42Smrg><DIV
11752c393a42SmrgCLASS="REFSECT2"
11762c393a42Smrg><A
1177ca08ab68SmrgNAME="AEN227"
11782c393a42Smrg></A
11792c393a42Smrg><H3
11802c393a42Smrg><TT
11812c393a42SmrgCLASS="LITERAL"
1182a6844aabSmrg>&#60;prefer&#62;</TT
11832c393a42Smrg>, <TT
11842c393a42SmrgCLASS="LITERAL"
1185a6844aabSmrg>&#60;accept&#62;</TT
11862c393a42Smrg>, <TT
11872c393a42SmrgCLASS="LITERAL"
1188a6844aabSmrg>&#60;default&#62;</TT
11892c393a42Smrg></H3
11902c393a42Smrg><P
11912c393a42Smrg>These hold a list of <TT
11922c393a42SmrgCLASS="LITERAL"
1193a6844aabSmrg>&#60;family&#62;</TT
11942c393a42Smrg> elements to be used by the <TT
11952c393a42SmrgCLASS="LITERAL"
1196a6844aabSmrg>&#60;alias&#62;</TT
11972c393a42Smrg> element.
11982c393a42Smrg  </P
11992c393a42Smrg></DIV
12002c393a42Smrg></DIV
12012c393a42Smrg><DIV
12022c393a42SmrgCLASS="REFSECT1"
12032c393a42Smrg><A
1204ca08ab68SmrgNAME="AEN235"
12052c393a42Smrg></A
12062c393a42Smrg><H2
12072c393a42Smrg>EXAMPLE CONFIGURATION FILE</H2
12082c393a42Smrg><DIV
12092c393a42SmrgCLASS="REFSECT2"
12102c393a42Smrg><A
1211ca08ab68SmrgNAME="AEN237"
12122c393a42Smrg></A
12132c393a42Smrg><H3
12142c393a42Smrg>System configuration file</H3
12152c393a42Smrg><P
12162c393a42Smrg>This is an example of a system-wide configuration file
12172c393a42Smrg    </P
1218a6844aabSmrg><TABLE
1219a6844aabSmrgBORDER="0"
1220a6844aabSmrgBGCOLOR="#E0E0E0"
1221a6844aabSmrgWIDTH="100%"
1222a6844aabSmrg><TR
1223a6844aabSmrg><TD
12242c393a42Smrg><PRE
12252c393a42SmrgCLASS="PROGRAMLISTING"
1226a6844aabSmrg>&#60;?xml version="1.0"?&#62;
1227a6844aabSmrg&#60;!DOCTYPE fontconfig SYSTEM "fonts.dtd"&#62;
1228a6844aabSmrg&#60;!-- /etc/fonts/fonts.conf file to configure system font access --&#62;
1229a6844aabSmrg&#60;fontconfig&#62;
1230a6844aabSmrg&#60;!-- 
12312c393a42Smrg	Find fonts in these directories
1232a6844aabSmrg--&#62;
1233a6844aabSmrg&#60;dir&#62;/usr/share/fonts&#60;/dir&#62;
1234a6844aabSmrg&#60;dir&#62;/usr/X11R6/lib/X11/fonts&#60;/dir&#62;
12352c393a42Smrg
1236a6844aabSmrg&#60;!--
12372c393a42Smrg	Accept deprecated 'mono' alias, replacing it with 'monospace'
1238a6844aabSmrg--&#62;
1239a6844aabSmrg&#60;match target="pattern"&#62;
1240a6844aabSmrg	&#60;test qual="any" name="family"&#62;&#60;string&#62;mono&#60;/string&#62;&#60;/test&#62;
1241a6844aabSmrg	&#60;edit name="family" mode="assign"&#62;&#60;string&#62;monospace&#60;/string&#62;&#60;/edit&#62;
1242a6844aabSmrg&#60;/match&#62;
12432c393a42Smrg
1244a6844aabSmrg&#60;!--
1245ca08ab68Smrg	Names not including any well known alias are given 'sans-serif'
1246a6844aabSmrg--&#62;
1247a6844aabSmrg&#60;match target="pattern"&#62;
1248ca08ab68Smrg	&#60;test qual="all" name="family" mode="not_eq"&#62;&#60;string&#62;sans-serif&#60;/string&#62;&#60;/test&#62;
1249ca08ab68Smrg	&#60;test qual="all" name="family" mode="not_eq"&#62;&#60;string&#62;serif&#60;/string&#62;&#60;/test&#62;
1250ca08ab68Smrg	&#60;test qual="all" name="family" mode="not_eq"&#62;&#60;string&#62;monospace&#60;/string&#62;&#60;/test&#62;
1251ca08ab68Smrg	&#60;edit name="family" mode="append_last"&#62;&#60;string&#62;sans-serif&#60;/string&#62;&#60;/edit&#62;
1252a6844aabSmrg&#60;/match&#62;
12532c393a42Smrg
1254a6844aabSmrg&#60;!--
12552c393a42Smrg	Load per-user customization file, but don't complain
12562c393a42Smrg	if it doesn't exist
1257a6844aabSmrg--&#62;
1258ca08ab68Smrg&#60;include ignore_missing="yes" prefix="xdg"&#62;fontconfig/fonts.conf&#60;/include&#62;
12592c393a42Smrg
1260a6844aabSmrg&#60;!--
12612c393a42Smrg	Load local customization files, but don't complain
12622c393a42Smrg	if there aren't any
1263a6844aabSmrg--&#62;
1264a6844aabSmrg&#60;include ignore_missing="yes"&#62;conf.d&#60;/include&#62;
1265a6844aabSmrg&#60;include ignore_missing="yes"&#62;local.conf&#60;/include&#62;
12662c393a42Smrg
1267a6844aabSmrg&#60;!--
12682c393a42Smrg	Alias well known font names to available TrueType fonts.
12692c393a42Smrg	These substitute TrueType faces for similar Type1
12702c393a42Smrg	faces to improve screen appearance.
1271a6844aabSmrg--&#62;
1272a6844aabSmrg&#60;alias&#62;
1273a6844aabSmrg	&#60;family&#62;Times&#60;/family&#62;
1274a6844aabSmrg	&#60;prefer&#62;&#60;family&#62;Times New Roman&#60;/family&#62;&#60;/prefer&#62;
1275a6844aabSmrg	&#60;default&#62;&#60;family&#62;serif&#60;/family&#62;&#60;/default&#62;
1276a6844aabSmrg&#60;/alias&#62;
1277a6844aabSmrg&#60;alias&#62;
1278a6844aabSmrg	&#60;family&#62;Helvetica&#60;/family&#62;
1279a6844aabSmrg	&#60;prefer&#62;&#60;family&#62;Arial&#60;/family&#62;&#60;/prefer&#62;
1280a6844aabSmrg	&#60;default&#62;&#60;family&#62;sans&#60;/family&#62;&#60;/default&#62;
1281a6844aabSmrg&#60;/alias&#62;
1282a6844aabSmrg&#60;alias&#62;
1283a6844aabSmrg	&#60;family&#62;Courier&#60;/family&#62;
1284a6844aabSmrg	&#60;prefer&#62;&#60;family&#62;Courier New&#60;/family&#62;&#60;/prefer&#62;
1285a6844aabSmrg	&#60;default&#62;&#60;family&#62;monospace&#60;/family&#62;&#60;/default&#62;
1286a6844aabSmrg&#60;/alias&#62;
12872c393a42Smrg
1288a6844aabSmrg&#60;!--
12892c393a42Smrg	Provide required aliases for standard names
12902c393a42Smrg	Do these after the users configuration file so that
12912c393a42Smrg	any aliases there are used preferentially
1292a6844aabSmrg--&#62;
1293a6844aabSmrg&#60;alias&#62;
1294a6844aabSmrg	&#60;family&#62;serif&#60;/family&#62;
1295a6844aabSmrg	&#60;prefer&#62;&#60;family&#62;Times New Roman&#60;/family&#62;&#60;/prefer&#62;
1296a6844aabSmrg&#60;/alias&#62;
1297a6844aabSmrg&#60;alias&#62;
1298a6844aabSmrg	&#60;family&#62;sans&#60;/family&#62;
1299a6844aabSmrg	&#60;prefer&#62;&#60;family&#62;Arial&#60;/family&#62;&#60;/prefer&#62;
1300a6844aabSmrg&#60;/alias&#62;
1301a6844aabSmrg&#60;alias&#62;
1302a6844aabSmrg	&#60;family&#62;monospace&#60;/family&#62;
1303a6844aabSmrg	&#60;prefer&#62;&#60;family&#62;Andale Mono&#60;/family&#62;&#60;/prefer&#62;
1304a6844aabSmrg&#60;/alias&#62;
1305ca08ab68Smrg
1306ca08ab68Smrg&#60;--
1307ca08ab68Smrg	The example of the requirements of OR operator;
1308ca08ab68Smrg	If the 'family' contains 'Courier New' OR 'Courier'
1309ca08ab68Smrg	add 'monospace' as the alternative
1310ca08ab68Smrg--&#62;
1311ca08ab68Smrg&#60;match target="pattern"&#62;
1312ca08ab68Smrg	&#60;test name="family" mode="eq"&#62;
1313ca08ab68Smrg		&#60;string&#62;Courier New&#60;/string&#62;
1314ca08ab68Smrg	&#60;/test&#62;
1315ca08ab68Smrg	&#60;edit name="family" mode="prepend"&#62;
1316ca08ab68Smrg		&#60;string&#62;monospace&#60;/string&#62;
1317ca08ab68Smrg	&#60;/edit&#62;
1318ca08ab68Smrg&#60;/match&#62;
1319ca08ab68Smrg&#60;match target="pattern"&#62;
1320ca08ab68Smrg	&#60;test name="family" mode="eq"&#62;
1321ca08ab68Smrg		&#60;string&#62;Courier&#60;/string&#62;
1322ca08ab68Smrg	&#60;/test&#62;
1323ca08ab68Smrg	&#60;edit name="family" mode="prepend"&#62;
1324ca08ab68Smrg		&#60;string&#62;monospace&#60;/string&#62;
1325ca08ab68Smrg	&#60;/edit&#62;
1326ca08ab68Smrg&#60;/match&#62;
1327ca08ab68Smrg
1328a6844aabSmrg&#60;/fontconfig&#62;
13292c393a42Smrg    </PRE
1330a6844aabSmrg></TD
1331a6844aabSmrg></TR
1332a6844aabSmrg></TABLE
13332c393a42Smrg></DIV
13342c393a42Smrg><DIV
13352c393a42SmrgCLASS="REFSECT2"
13362c393a42Smrg><A
1337ca08ab68SmrgNAME="AEN241"
13382c393a42Smrg></A
13392c393a42Smrg><H3
13402c393a42Smrg>User configuration file</H3
13412c393a42Smrg><P
13422c393a42Smrg>This is an example of a per-user configuration file that lives in
1343ca08ab68Smrg$XDG_CONFIG_HOME/fontconfig/fonts.conf
13442c393a42Smrg    </P
1345a6844aabSmrg><TABLE
1346a6844aabSmrgBORDER="0"
1347a6844aabSmrgBGCOLOR="#E0E0E0"
1348a6844aabSmrgWIDTH="100%"
1349a6844aabSmrg><TR
1350a6844aabSmrg><TD
13512c393a42Smrg><PRE
13522c393a42SmrgCLASS="PROGRAMLISTING"
1353a6844aabSmrg>&#60;?xml version="1.0"?&#62;
1354a6844aabSmrg&#60;!DOCTYPE fontconfig SYSTEM "fonts.dtd"&#62;
1355ca08ab68Smrg&#60;!-- $XDG_CONFIG_HOME/fontconfig/fonts.conf for per-user font configuration --&#62;
1356a6844aabSmrg&#60;fontconfig&#62;
13572c393a42Smrg
1358a6844aabSmrg&#60;!--
13592c393a42Smrg	Private font directory
1360a6844aabSmrg--&#62;
1361ca08ab68Smrg&#60;dir prefix="xdg"&#62;fonts&#60;/dir&#62;
13622c393a42Smrg
1363a6844aabSmrg&#60;!--
13642c393a42Smrg	use rgb sub-pixel ordering to improve glyph appearance on
13652c393a42Smrg	LCD screens.  Changes affecting rendering, but not matching
13662c393a42Smrg	should always use target="font".
1367a6844aabSmrg--&#62;
1368a6844aabSmrg&#60;match target="font"&#62;
1369a6844aabSmrg	&#60;edit name="rgba" mode="assign"&#62;&#60;const&#62;rgb&#60;/const&#62;&#60;/edit&#62;
1370a6844aabSmrg&#60;/match&#62;
1371ca08ab68Smrg&#60;!--
1372ca08ab68Smrg	use WenQuanYi Zen Hei font when serif is requested for Chinese
1373ca08ab68Smrg--&#62;
1374ca08ab68Smrg&#60;match&#62;
1375ca08ab68Smrg	&#60;!--
1376ca08ab68Smrg		If you don't want to use WenQuanYi Zen Hei font for zh-tw etc,
1377ca08ab68Smrg		you can use zh-cn instead of zh.
1378ca08ab68Smrg		Please note, even if you set zh-cn, it still matches zh.
1379ca08ab68Smrg		if you don't like it, you can use compare="eq"
1380ca08ab68Smrg		instead of compare="contains".
1381ca08ab68Smrg	--&#62;
1382ca08ab68Smrg	&#60;test name="lang" compare="contains"&#62;
1383ca08ab68Smrg		&#60;string&#62;zh&#60;/string&#62;
1384ca08ab68Smrg	&#60;/test&#62;
1385ca08ab68Smrg	&#60;test name="family"&#62;
1386ca08ab68Smrg		&#60;string&#62;serif&#60;/string&#62;
1387ca08ab68Smrg	&#60;/test&#62;
1388ca08ab68Smrg	&#60;edit name="family" mode="prepend"&#62;
1389ca08ab68Smrg		&#60;string&#62;WenQuanYi Zen Hei&#60;/string&#62;
1390ca08ab68Smrg	&#60;/edit&#62;
1391ca08ab68Smrg&#60;/match&#62;
1392ca08ab68Smrg&#60;!--
1393ca08ab68Smrg	use VL Gothic font when sans-serif is requested for Japanese
1394ca08ab68Smrg--&#62;
1395ca08ab68Smrg&#60;match&#62;
1396ca08ab68Smrg	&#60;test name="lang" compare="contains"&#62;
1397ca08ab68Smrg		&#60;string&#62;ja&#60;/string&#62;
1398ca08ab68Smrg	&#60;/test&#62;
1399ca08ab68Smrg	&#60;test name="family"&#62;
1400ca08ab68Smrg		&#60;string&#62;sans-serif&#60;/string&#62;
1401ca08ab68Smrg	&#60;/test&#62;
1402ca08ab68Smrg	&#60;edit name="family" mode="prepend"&#62;
1403ca08ab68Smrg		&#60;string&#62;VL Gothic&#60;/string&#62;
1404ca08ab68Smrg	&#60;/edit&#62;
1405ca08ab68Smrg&#60;/match&#62;
1406a6844aabSmrg&#60;/fontconfig&#62;
14072c393a42Smrg    </PRE
1408a6844aabSmrg></TD
1409a6844aabSmrg></TR
1410a6844aabSmrg></TABLE
14112c393a42Smrg></DIV
14122c393a42Smrg></DIV
14132c393a42Smrg><DIV
14142c393a42SmrgCLASS="REFSECT1"
14152c393a42Smrg><A
1416ca08ab68SmrgNAME="AEN245"
14172c393a42Smrg></A
14182c393a42Smrg><H2
14192c393a42Smrg>Files</H2
14202c393a42Smrg><P
14212c393a42Smrg><I
14222c393a42SmrgCLASS="EMPHASIS"
14232c393a42Smrg>fonts.conf</I
14242c393a42Smrg>
14252c393a42Smrgcontains configuration information for the fontconfig library
14262c393a42Smrgconsisting of directories to look at for font information as well as
14272c393a42Smrginstructions on editing program specified font patterns before attempting to
1428ca08ab68Smrgmatch the available fonts.  It is in XML format.
14292c393a42Smrg  </P
14302c393a42Smrg><P
14312c393a42Smrg><I
14322c393a42SmrgCLASS="EMPHASIS"
14332c393a42Smrg>conf.d</I
14342c393a42Smrg>
14352c393a42Smrgis the conventional name for a directory of additional configuration files
14362c393a42Smrgmanaged by external applications or the local administrator.  The
14372c393a42Smrgfilenames starting with decimal digits are sorted in lexicographic order
1438ca08ab68Smrgand used as additional configuration files.  All of these files are in XML
14392c393a42Smrgformat.  The master fonts.conf file references this directory in an 
1440a6844aabSmrg&#60;include&#62; directive.
14412c393a42Smrg  </P
14422c393a42Smrg><P
14432c393a42Smrg><I
14442c393a42SmrgCLASS="EMPHASIS"
14452c393a42Smrg>fonts.dtd</I
14462c393a42Smrg>
14472c393a42Smrgis a DTD that describes the format of the configuration files.
14482c393a42Smrg  </P
14492c393a42Smrg><P
1450a6844aabSmrg><I
1451a6844aabSmrgCLASS="EMPHASIS"
1452ca08ab68Smrg>$XDG_CONFIG_HOME/fontconfig/conf.d</I
1453ca08ab68Smrg> and <I
1454ca08ab68SmrgCLASS="EMPHASIS"
1455a6844aabSmrg>~/.fonts.conf.d</I
1456a6844aabSmrg>
1457a6844aabSmrgis the conventional name for a per-user directory of (typically
1458a6844aabSmrgauto-generated) configuration files, although the
1459ca08ab68Smrgactual 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.
1460a6844aabSmrg  </P
1461a6844aabSmrg><P
14622c393a42Smrg><I
14632c393a42SmrgCLASS="EMPHASIS"
1464ca08ab68Smrg>$XDG_CONFIG_HOME/fontconfig/fonts.conf</I
1465ca08ab68Smrg> and <I
1466ca08ab68SmrgCLASS="EMPHASIS"
14672c393a42Smrg>~/.fonts.conf</I
14682c393a42Smrg>
14692c393a42Smrgis the conventional location for per-user font configuration, although the
1470ca08ab68Smrgactual 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.
14712c393a42Smrg  </P
14722c393a42Smrg><P
14732c393a42Smrg><I
14742c393a42SmrgCLASS="EMPHASIS"
1475ca08ab68Smrg>$XDG_CACHE_HOME/fontconfig/*.cache-*</I
1476ca08ab68Smrg> and <I
1477ca08ab68SmrgCLASS="EMPHASIS"
1478ca08ab68Smrg> ~/.fontconfig/*.cache-*</I
14792c393a42Smrg>
14802c393a42Smrgis the conventional repository of font information that isn't found in the
1481ca08ab68Smrgper-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.
1482ca08ab68Smrg  </P
1483ca08ab68Smrg></DIV
1484ca08ab68Smrg><DIV
1485ca08ab68SmrgCLASS="REFSECT1"
1486ca08ab68Smrg><A
1487ca08ab68SmrgNAME="AEN262"
1488ca08ab68Smrg></A
1489ca08ab68Smrg><H2
1490ca08ab68Smrg>Environment variables</H2
1491ca08ab68Smrg><P
1492ca08ab68Smrg><I
1493ca08ab68SmrgCLASS="EMPHASIS"
1494ca08ab68Smrg>FONTCONFIG_FILE</I
1495ca08ab68Smrg>
1496ca08ab68Smrgis used to override the default configuration file.
1497ca08ab68Smrg  </P
1498ca08ab68Smrg><P
1499ca08ab68Smrg><I
1500ca08ab68SmrgCLASS="EMPHASIS"
1501ca08ab68Smrg>FONTCONFIG_PATH</I
1502ca08ab68Smrg>
1503ca08ab68Smrgis used to override the default configuration directory.
1504ca08ab68Smrg  </P
1505ca08ab68Smrg><P
1506ca08ab68Smrg><I
1507ca08ab68SmrgCLASS="EMPHASIS"
1508ca08ab68Smrg>FC_DEBUG</I
1509ca08ab68Smrg>
1510ca08ab68Smrgis used to output the detailed debugging messages. see <A
1511ca08ab68SmrgHREF="#DEBUG"
1512ca08ab68Smrg>Debugging Applications</A
1513ca08ab68Smrg> section for more details.
1514ca08ab68Smrg  </P
1515ca08ab68Smrg><P
1516ca08ab68Smrg><I
1517ca08ab68SmrgCLASS="EMPHASIS"
1518953daebaSmrg>FC_DBG_MATCH_FILTER</I
1519953daebaSmrg>
1520953daebaSmrgis 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
1521953daebaSmrgHREF="#DEBUG"
1522953daebaSmrg>Debugging Applications</A
1523953daebaSmrg> section for more details.
1524953daebaSmrg  </P
1525953daebaSmrg><P
1526953daebaSmrg><I
1527953daebaSmrgCLASS="EMPHASIS"
1528953daebaSmrg>FC_LANG</I
1529953daebaSmrg>
1530953daebaSmrgis 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.
1531953daebaSmrg  </P
1532953daebaSmrg><P
1533953daebaSmrg><I
1534953daebaSmrgCLASS="EMPHASIS"
1535ca08ab68Smrg>FONTCONFIG_USE_MMAP</I
1536ca08ab68Smrg>
1537ca08ab68Smrgis 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.
15382c393a42Smrg  </P
15392c393a42Smrg></DIV
15402c393a42Smrg><DIV
15412c393a42SmrgCLASS="REFSECT1"
15422c393a42Smrg><A
1543953daebaSmrgNAME="AEN278"
15442c393a42Smrg></A
15452c393a42Smrg><H2
15462c393a42Smrg>See Also</H2
15472c393a42Smrg><P
1548a6844aabSmrg>fc-cat(1), fc-cache(1), fc-list(1), fc-match(1), fc-query(1)
15492c393a42Smrg  </P
15502c393a42Smrg></DIV
15512c393a42Smrg><DIV
15522c393a42SmrgCLASS="REFSECT1"
15532c393a42Smrg><A
1554953daebaSmrgNAME="AEN281"
15552c393a42Smrg></A
15562c393a42Smrg><H2
15572c393a42Smrg>Version</H2
15582c393a42Smrg><P
1559953daebaSmrg>Fontconfig version 2.12.4
15602c393a42Smrg
15612c393a42Smrg	    </P
15622c393a42Smrg></DIV
15632c393a42Smrg></BODY
15642c393a42Smrg></HTML
15652c393a42Smrg>