12c393a42Smrg<!-- This is the Document Type Definition for font configuration files -->
2a4e54154Smrg<!ELEMENT fontconfig (alias |
32c393a42Smrg		      cache | 
42c393a42Smrg		      cachedir |
52c393a42Smrg		      config |
6a4e54154Smrg		      description |
7a4e54154Smrg		      dir |
8a4e54154Smrg		      include |
9a4e54154Smrg		      match |
10a4e54154Smrg		      remap-dir |
11a4e54154Smrg		      reset-dirs |
12a4e54154Smrg		      selectfont)* >
132c393a42Smrg
142c393a42Smrg<!-- 
152c393a42Smrg    Add a directory that provides fonts
162c393a42Smrg-->
172c393a42Smrg<!ELEMENT dir (#PCDATA)>
18ca08ab68Smrg<!ATTLIST dir
19a4e54154Smrg	  prefix    (default|xdg|relative|cwd)    "default"
20a4e54154Smrg	  xml:space (default|preserve)            'preserve'>
212c393a42Smrg
222c393a42Smrg<!--
232c393a42Smrg    Define the per-user file that holds cache font information.
242c393a42Smrg
252c393a42Smrg    If the filename begins with '~', it is replaced with the users
262c393a42Smrg    home directory path.
27a4e54154Smrg
28a4e54154Smrg    If 'prefix' is 'default' or 'cwd', then the current working directory will be added prior to the value.
29a4e54154Smrg    If 'prefix' is 'xdg', then the value in the $XDG_DATA_HOME will be added prior to the value.
30a4e54154Smrg    If 'prefix' is 'relative', then the path of current file will be added prior to the value.
312c393a42Smrg-->
322c393a42Smrg<!ELEMENT cache (#PCDATA)>
332c393a42Smrg<!ATTLIST cache xml:space (default|preserve) 'preserve'>
342c393a42Smrg
352c393a42Smrg<!--
362c393a42Smrg    Add a directory that is searched for font cache files.
372c393a42Smrg    These hold per-directory cache data and are searched in
382c393a42Smrg    order for each directory. When writing cache files, the first
392c393a42Smrg    directory which allows the cache file to be created is used.
402c393a42Smrg
412c393a42Smrg    A leading '~' in a directory name is replaced with the users
422c393a42Smrg    home directory path.
432c393a42Smrg-->
442c393a42Smrg<!ELEMENT cachedir (#PCDATA)>
45ca08ab68Smrg<!ATTLIST cachedir
46ca08ab68Smrg	  prefix    CDATA      "default"
47ca08ab68Smrg	  xml:space (default|preserve) 'preserve'>
482c393a42Smrg
49a4e54154Smrg<!--
50a4e54154Smrg    Set a string as a description for the targeted config file
51a4e54154Smrg
52a4e54154Smrg    Set 'domain' to change where to pull translations from.
53a4e54154Smrg    This will be done through gettext.
54a4e54154Smrg-->
55a4e54154Smrg<!ELEMENT description (#PCDATA)>
56a4e54154Smrg<!ATTLIST description
57a4e54154Smrg	  domain	CDATA	"fontconfig-conf">
58a4e54154Smrg
592c393a42Smrg<!--
602c393a42Smrg    Reference another configuration file; note that this
612c393a42Smrg    is another complete font configuration file and not
622c393a42Smrg    just a file included by the XML parser.
632c393a42Smrg
642c393a42Smrg    Set 'ignore_missing' to 'yes' if errors are to be ignored.
652c393a42Smrg
662c393a42Smrg    If the filename begins with '~', it is replaced with the users
672c393a42Smrg    home directory path.
682c393a42Smrg-->
692c393a42Smrg<!ELEMENT include (#PCDATA)>
702c393a42Smrg<!ATTLIST include
712c393a42Smrg	  ignore_missing    (no|yes)		"no"
72ca08ab68Smrg	  prefix	    CDATA               "default"
73ca08ab68Smrg	  deprecated	    (yes|no)		"no"
742c393a42Smrg	  xml:space	    (default|preserve)	"preserve">
752c393a42Smrg
762c393a42Smrg<!--
772c393a42Smrg    Global library configuration data
782c393a42Smrg -->
792c393a42Smrg<!ELEMENT config (blank|rescan)*>
802c393a42Smrg
812c393a42Smrg<!--
822c393a42Smrg    Specify the set of Unicode encoding values which
832c393a42Smrg    represent glyphs that are allowed to contain no
842c393a42Smrg    data.  With this list, fontconfig can examine
852c393a42Smrg    fonts for broken glyphs and eliminate them from
862c393a42Smrg    the set of valid Unicode chars.  This idea
872c393a42Smrg    was borrowed from Mozilla
882c393a42Smrg -->
89ca08ab68Smrg<!ELEMENT blank (int|range)*>
902c393a42Smrg
912c393a42Smrg<!--
922c393a42Smrg    Aliases are just a special case for multiple match elements
932c393a42Smrg
942c393a42Smrg    They are syntactically equivalent to:
952c393a42Smrg
962c393a42Smrg    <match>
972c393a42Smrg	<test name="family">
982c393a42Smrg	    <string value=[family]/>
992c393a42Smrg	</test>
1002c393a42Smrg	<edit name="family" mode="prepend">
1012c393a42Smrg	    <string value=[prefer]/>
1022c393a42Smrg	    ...
1032c393a42Smrg	</edit>
1042c393a42Smrg	<edit name="family" mode="append">
1052c393a42Smrg	    <string value=[accept]/>
1062c393a42Smrg	    ...
1072c393a42Smrg	</edit>
1082c393a42Smrg	<edit name="family" mode="append_last">
1092c393a42Smrg	    <string value=[default]/>
1102c393a42Smrg	    ...
1112c393a42Smrg	</edit>
1122c393a42Smrg    </match>
1132c393a42Smrg-->
114a4e54154Smrg
115a4e54154Smrg<!--
116a4e54154Smrg    Map a font path as the path "as-path"
117a4e54154Smrg-->
118a4e54154Smrg<!ELEMENT remap-dir (#PCDATA)>
119a4e54154Smrg<!ATTLIST remap-dir
120a4e54154Smrg          as-path   CDATA                       #REQUIRED
121a4e54154Smrg          prefix    (default|xdg|relative|cwd)  "default"
122a4e54154Smrg	  xml:space (default|preserve)          "preserve">
123a4e54154Smrg
124a4e54154Smrg<!--
125a4e54154Smrg    Reset the list of fonts directories
126a4e54154Smrg-->
127a4e54154Smrg<!ELEMENT reset-dirs EMPTY>
128a4e54154Smrg
1292c393a42Smrg<!--
1302c393a42Smrg    Periodically rescan the font configuration and
1312c393a42Smrg    directories to synch internal state with filesystem
1322c393a42Smrg -->
1332c393a42Smrg<!ELEMENT rescan (int)>
1342c393a42Smrg
1352c393a42Smrg<!--
1362c393a42Smrg    Edit list of available fonts at startup/reload time
1372c393a42Smrg -->
1382c393a42Smrg<!ELEMENT selectfont (rejectfont | acceptfont)* >
1392c393a42Smrg
1402c393a42Smrg<!ELEMENT rejectfont (glob | pattern)*>
1412c393a42Smrg
1422c393a42Smrg<!ELEMENT acceptfont (glob | pattern)*>
1432c393a42Smrg
1442c393a42Smrg<!ELEMENT glob (#PCDATA)>
1452c393a42Smrg
1462c393a42Smrg<!ELEMENT pattern (patelt)*>
1472c393a42Smrg
148ca08ab68Smrg<!ENTITY % constant 'int|double|string|matrix|bool|charset|langset|const'>
1492c393a42Smrg
1502c393a42Smrg<!ELEMENT patelt (%constant;)*>
1512c393a42Smrg<!ATTLIST patelt
1522c393a42Smrg	  name CDATA	#REQUIRED>
1532c393a42Smrg
154ca08ab68Smrg<!ELEMENT alias (test?, family*, prefer?, accept?, default?)>
1552c393a42Smrg<!ATTLIST alias
1562c393a42Smrg	  binding (weak|strong|same) "weak">
1572c393a42Smrg<!ELEMENT prefer (family)*>
1582c393a42Smrg<!ELEMENT accept (family)*>
1592c393a42Smrg<!ELEMENT default (family)*>
1602c393a42Smrg<!ELEMENT family (#PCDATA)>
1612c393a42Smrg<!ATTLIST family xml:space (default|preserve) 'preserve'>
1622c393a42Smrg
163ca08ab68Smrg<!ENTITY % expr 'int|double|string|matrix|bool|charset|langset
1642c393a42Smrg		|name|const
1652c393a42Smrg		|or|and|eq|not_eq|less|less_eq|more|more_eq|contains|not_contains
1662c393a42Smrg		|plus|minus|times|divide|not|if|floor|ceil|round|trunc'>
1672c393a42Smrg
1682c393a42Smrg<!--
1692c393a42Smrg    Match and edit patterns.
1702c393a42Smrg
1712c393a42Smrg    If 'target' is 'pattern', execute the match before selecting a font.
1722c393a42Smrg    if 'target' is 'font', execute the match on the result of a font
1732c393a42Smrg    selection.
1742c393a42Smrg-->
175b09479dcSmrg<!ELEMENT match (test|edit)+>
1762c393a42Smrg<!ATTLIST match
1772c393a42Smrg	  target (pattern|font|scan) "pattern">
1782c393a42Smrg
1792c393a42Smrg<!--
1802c393a42Smrg    Match a field in a pattern
1812c393a42Smrg
1822c393a42Smrg    if 'qual' is 'any', then the match succeeds if any value in the field matches.
1832c393a42Smrg    if 'qual' is 'all', then the match succeeds only if all values match.
1842c393a42Smrg    if 'qual' is 'first', then the match succeeds only if the first value matches.
1852c393a42Smrg    if 'qual' is 'not_first', then the match succeeds only if any value other than
1862c393a42Smrg    	the first matches.
1872c393a42Smrg    For match elements with target=font, if test 'target' is 'pattern',
1882c393a42Smrg    then the test is applied to the pattern used in matching rather than
1892c393a42Smrg    to the resulting font.
1902c393a42Smrg
1912c393a42Smrg    Match elements with target=scan are applied as fonts are scanned.
1922c393a42Smrg    They edit the pattern generated from the scanned font and affect
1932c393a42Smrg    what the fontconfig database contains.
1942c393a42Smrg-->
1952c393a42Smrg<!ELEMENT test (%expr;)*>
1962c393a42Smrg<!ATTLIST test 
1972c393a42Smrg	  qual (any|all|first|not_first)    "any"
1982c393a42Smrg	  name CDATA	    #REQUIRED
1992c393a42Smrg	  target (pattern|font|default)		"default"
200ca08ab68Smrg	  ignore-blanks (true|false)	"false"
2012c393a42Smrg	  compare (eq|not_eq|less|less_eq|more|more_eq|contains|not_contains)	"eq">
2022c393a42Smrg
2032c393a42Smrg<!--
2042c393a42Smrg    Edit a field in a pattern
2052c393a42Smrg
2062c393a42Smrg    The enclosed values are used together to edit the list of values
2072c393a42Smrg    associated with 'name'.
2082c393a42Smrg
2092c393a42Smrg    If 'name' matches one of those used in a test element for this match element:
2102c393a42Smrg	if 'mode' is 'assign', replace the matched value.
2112c393a42Smrg	if 'mode' is 'assign_replace', replace all of the values
2122c393a42Smrg	if 'mode' is 'prepend', insert before the matched value
2132c393a42Smrg	if 'mode' is 'append', insert after the matched value
2142c393a42Smrg	if 'mode' is 'prepend_first', insert before all of the values
2152c393a42Smrg	if 'mode' is 'append_last', insert after all of the values
2162c393a42Smrg    If 'name' doesn't match any of those used in a test element:
2172c393a42Smrg	if 'mode' is 'assign' or 'assign_replace, replace all of the values
2182c393a42Smrg	if 'mode' is 'prepend' or 'prepend_first', insert before all of the values
2192c393a42Smrg	if 'mode' is 'append' or 'append_last', insert after all of the values
2202c393a42Smrg-->
2212c393a42Smrg<!ELEMENT edit (%expr;)*>
2222c393a42Smrg<!ATTLIST edit
2232c393a42Smrg	  name CDATA	    #REQUIRED
224c9710b42Smrg	  mode (assign|assign_replace|prepend|append|prepend_first|append_last|delete|delete_all) "assign"
2252c393a42Smrg	  binding (weak|strong|same) "weak">
2262c393a42Smrg
2272c393a42Smrg<!--
2282c393a42Smrg    Elements of expressions follow
2292c393a42Smrg-->
2302c393a42Smrg<!ELEMENT int (#PCDATA)>
2312c393a42Smrg<!ATTLIST int xml:space (default|preserve) 'preserve'>
2322c393a42Smrg<!ELEMENT double (#PCDATA)>
2332c393a42Smrg<!ATTLIST double xml:space (default|preserve) 'preserve'>
2342c393a42Smrg<!ELEMENT string (#PCDATA)>
2352c393a42Smrg<!ATTLIST string xml:space (default|preserve) 'preserve'>
236c9710b42Smrg<!ELEMENT matrix ((%expr;), (%expr;), (%expr;), (%expr;))>
2372c393a42Smrg<!ELEMENT bool (#PCDATA)>
238ca08ab68Smrg<!ELEMENT charset (int|range)*>
239ca08ab68Smrg<!ELEMENT range (int,int)>
240ca08ab68Smrg<!ELEMENT langset (string)*>
2412c393a42Smrg<!ELEMENT name (#PCDATA)>
242c9710b42Smrg<!ATTLIST name xml:space (default|preserve) 'preserve'
243c9710b42Smrg	  target (default|font|pattern) 'default'>
2442c393a42Smrg<!ELEMENT const (#PCDATA)>
2452c393a42Smrg<!ATTLIST const xml:space (default|preserve) 'preserve'>
2462c393a42Smrg<!ELEMENT or (%expr;)*>
2472c393a42Smrg<!ELEMENT and (%expr;)*>
2482c393a42Smrg<!ELEMENT eq ((%expr;), (%expr;))>
2492c393a42Smrg<!ELEMENT not_eq ((%expr;), (%expr;))>
2502c393a42Smrg<!ELEMENT less ((%expr;), (%expr;))>
2512c393a42Smrg<!ELEMENT less_eq ((%expr;), (%expr;))>
2522c393a42Smrg<!ELEMENT more ((%expr;), (%expr;))>
2532c393a42Smrg<!ELEMENT more_eq ((%expr;), (%expr;))>
2542c393a42Smrg<!ELEMENT contains ((%expr;), (%expr;))>
2552c393a42Smrg<!ELEMENT not_contains ((%expr;), (%expr;))>
2562c393a42Smrg<!ELEMENT plus (%expr;)*>
2572c393a42Smrg<!ELEMENT minus (%expr;)*>
2582c393a42Smrg<!ELEMENT times (%expr;)*>
2592c393a42Smrg<!ELEMENT divide (%expr;)*>
2602c393a42Smrg<!ELEMENT not (%expr;)>
2612c393a42Smrg<!ELEMENT if ((%expr;), (%expr;), (%expr;))>
2622c393a42Smrg<!ELEMENT floor (%expr;)>
2632c393a42Smrg<!ELEMENT ceil (%expr;)>
2642c393a42Smrg<!ELEMENT round (%expr;)>
2652c393a42Smrg<!ELEMENT trunc (%expr;)>
266