1 <!-- This is the Document Type Definition for font configuration files -->
2 <!ELEMENT fontconfig (dir |
12 Add a directory that provides fonts
14 <!ELEMENT dir (#PCDATA)>
15 <!ATTLIST dir xml:space (default|preserve) 'preserve'>
18 Define the per-user file that holds cache font information.
20 If the filename begins with '~', it is replaced with the users
23 <!ELEMENT cache (#PCDATA)>
24 <!ATTLIST cache xml:space (default|preserve) 'preserve'>
27 Add a directory that is searched for font cache files.
28 These hold per-directory cache data and are searched in
29 order for each directory. When writing cache files, the first
30 directory which allows the cache file to be created is used.
32 A leading '~' in a directory name is replaced with the users
35 <!ELEMENT cachedir (#PCDATA)>
36 <!ATTLIST cachedir xml:space (default|preserve) 'preserve'>
39 Reference another configuration file; note that this
40 is another complete font configuration file and not
41 just a file included by the XML parser.
43 Set 'ignore_missing' to 'yes' if errors are to be ignored.
45 If the filename begins with '~', it is replaced with the users
48 <!ELEMENT include (#PCDATA)>
50 ignore_missing (no|yes) "no"
51 xml:space (default|preserve) "preserve">
54 Global library configuration data
56 <!ELEMENT config (blank|rescan)*>
59 Specify the set of Unicode encoding values which
60 represent glyphs that are allowed to contain no
61 data. With this list, fontconfig can examine
62 fonts for broken glyphs and eliminate them from
63 the set of valid Unicode chars. This idea
64 was borrowed from Mozilla
66 <!ELEMENT blank (int)*>
69 Aliases are just a special case for multiple match elements
71 They are syntactically equivalent to:
75 <string value=[family]/>
77 <edit name="family" mode="prepend">
78 <string value=[prefer]/>
81 <edit name="family" mode="append">
82 <string value=[accept]/>
85 <edit name="family" mode="append_last">
86 <string value=[default]/>
92 Periodically rescan the font configuration and
93 directories to synch internal state with filesystem
95 <!ELEMENT rescan (int)>
98 Edit list of available fonts at startup/reload time
100 <!ELEMENT selectfont (rejectfont | acceptfont)* >
102 <!ELEMENT rejectfont (glob | pattern)*>
104 <!ELEMENT acceptfont (glob | pattern)*>
106 <!ELEMENT glob (#PCDATA)>
108 <!ELEMENT pattern (patelt)*>
110 <!ENTITY % constant 'int|double|string|matrix|bool|charset|const'>
112 <!ELEMENT patelt (%constant;)*>
114 name CDATA #REQUIRED>
116 <!ELEMENT alias (family*, prefer?, accept?, default?)>
117 <!ELEMENT prefer (family)*>
118 <!ELEMENT accept (family)*>
119 <!ELEMENT default (family)*>
120 <!ELEMENT family (#PCDATA)>
121 <!ATTLIST family xml:space (default|preserve) 'preserve'>
123 <!ENTITY % expr 'int|double|string|matrix|bool|charset
125 |or|and|eq|not_eq|less|less_eq|more|more_eq|contains|not_contains
126 |plus|minus|times|divide|not|if|floor|ceil|round|trunc'>
129 Match and edit patterns.
131 If 'target' is 'pattern', execute the match before selecting a font.
132 if 'target' is 'font', execute the match on the result of a font
135 <!ELEMENT match (test*, edit*)>
137 target (pattern|font|scan) "pattern">
140 Match a field in a pattern
142 if 'qual' is 'any', then the match succeeds if any value in the field matches.
143 if 'qual' is 'all', then the match succeeds only if all values match.
144 if 'qual' is 'first', then the match succeeds only if the first value matches.
145 if 'qual' is 'not_first', then the match succeeds only if any value other than
147 For match elements with target=font, if test 'target' is 'pattern',
148 then the test is applied to the pattern used in matching rather than
149 to the resulting font.
151 Match elements with target=scan are applied as fonts are scanned.
152 They edit the pattern generated from the scanned font and affect
153 what the fontconfig database contains.
155 <!ELEMENT test (%expr;)*>
157 qual (any|all|first|not_first) "any"
159 target (pattern|font|default) "default"
160 compare (eq|not_eq|less|less_eq|more|more_eq|contains|not_contains) "eq">
163 Edit a field in a pattern
165 The enclosed values are used together to edit the list of values
166 associated with 'name'.
168 If 'name' matches one of those used in a test element for this match element:
169 if 'mode' is 'assign', replace the matched value.
170 if 'mode' is 'assign_replace', replace all of the values
171 if 'mode' is 'prepend', insert before the matched value
172 if 'mode' is 'append', insert after the matched value
173 if 'mode' is 'prepend_first', insert before all of the values
174 if 'mode' is 'append_last', insert after all of the values
175 If 'name' doesn't match any of those used in a test element:
176 if 'mode' is 'assign' or 'assign_replace, replace all of the values
177 if 'mode' is 'prepend' or 'prepend_first', insert before all of the values
178 if 'mode' is 'append' or 'append_last', insert after all of the values
180 <!ELEMENT edit (%expr;)*>
183 mode (assign|assign_replace|prepend|append|prepend_first|append_last) "assign"
184 binding (weak|strong|same) "weak">
187 Elements of expressions follow
189 <!ELEMENT int (#PCDATA)>
190 <!ATTLIST int xml:space (default|preserve) 'preserve'>
191 <!ELEMENT double (#PCDATA)>
192 <!ATTLIST double xml:space (default|preserve) 'preserve'>
193 <!ELEMENT string (#PCDATA)>
194 <!ATTLIST string xml:space (default|preserve) 'preserve'>
195 <!ELEMENT matrix (double,double,double,double)>
196 <!ELEMENT bool (#PCDATA)>
197 <!ELEMENT charset (#PCDATA)>
198 <!ATTLIST charset xml:space (default|preserve) 'preserve'>
199 <!ELEMENT name (#PCDATA)>
200 <!ATTLIST name xml:space (default|preserve) 'preserve'>
201 <!ELEMENT const (#PCDATA)>
202 <!ATTLIST const xml:space (default|preserve) 'preserve'>
203 <!ELEMENT or (%expr;)*>
204 <!ELEMENT and (%expr;)*>
205 <!ELEMENT eq ((%expr;), (%expr;))>
206 <!ELEMENT not_eq ((%expr;), (%expr;))>
207 <!ELEMENT less ((%expr;), (%expr;))>
208 <!ELEMENT less_eq ((%expr;), (%expr;))>
209 <!ELEMENT more ((%expr;), (%expr;))>
210 <!ELEMENT more_eq ((%expr;), (%expr;))>
211 <!ELEMENT contains ((%expr;), (%expr;))>
212 <!ELEMENT not_contains ((%expr;), (%expr;))>
213 <!ELEMENT plus (%expr;)*>
214 <!ELEMENT minus (%expr;)*>
215 <!ELEMENT times (%expr;)*>
216 <!ELEMENT divide (%expr;)*>
217 <!ELEMENT not (%expr;)>
218 <!ELEMENT if ((%expr;), (%expr;), (%expr;))>
219 <!ELEMENT floor (%expr;)>
220 <!ELEMENT ceil (%expr;)>
221 <!ELEMENT round (%expr;)>
222 <!ELEMENT trunc (%expr;)>