1 <!-- This is the Document Type Definition for font configuration files -->
2 <!ELEMENT fontconfig (alias |
15 Add a directory that provides fonts
17 <!ELEMENT dir (#PCDATA)>
19 prefix (default|xdg|relative|cwd) "default"
20 xml:space (default|preserve) 'preserve'>
23 Define the per-user file that holds cache font information.
25 If the filename begins with '~', it is replaced with the users
28 If 'prefix' is 'default' or 'cwd', then the current working directory will be added prior to the value.
29 If 'prefix' is 'xdg', then the value in the $XDG_DATA_HOME will be added prior to the value.
30 If 'prefix' is 'relative', then the path of current file will be added prior to the value.
32 <!ELEMENT cache (#PCDATA)>
33 <!ATTLIST cache xml:space (default|preserve) 'preserve'>
36 Add a directory that is searched for font cache files.
37 These hold per-directory cache data and are searched in
38 order for each directory. When writing cache files, the first
39 directory which allows the cache file to be created is used.
41 A leading '~' in a directory name is replaced with the users
44 <!ELEMENT cachedir (#PCDATA)>
46 prefix CDATA "default"
47 xml:space (default|preserve) 'preserve'>
50 Set a string as a description for the targeted config file
52 Set 'domain' to change where to pull translations from.
53 This will be done through gettext.
55 <!ELEMENT description (#PCDATA)>
57 domain CDATA "fontconfig-conf">
60 Reference another configuration file; note that this
61 is another complete font configuration file and not
62 just a file included by the XML parser.
64 Set 'ignore_missing' to 'yes' if errors are to be ignored.
66 If the filename begins with '~', it is replaced with the users
69 <!ELEMENT include (#PCDATA)>
71 ignore_missing (no|yes) "no"
72 prefix CDATA "default"
73 deprecated (yes|no) "no"
74 xml:space (default|preserve) "preserve">
77 Global library configuration data
79 <!ELEMENT config (blank|rescan)*>
82 Specify the set of Unicode encoding values which
83 represent glyphs that are allowed to contain no
84 data. With this list, fontconfig can examine
85 fonts for broken glyphs and eliminate them from
86 the set of valid Unicode chars. This idea
87 was borrowed from Mozilla
89 <!ELEMENT blank (int|range)*>
92 Aliases are just a special case for multiple match elements
94 They are syntactically equivalent to:
98 <string value=[family]/>
100 <edit name="family" mode="prepend">
101 <string value=[prefer]/>
104 <edit name="family" mode="append">
105 <string value=[accept]/>
108 <edit name="family" mode="append_last">
109 <string value=[default]/>
116 Map a font path as the path "as-path"
118 <!ELEMENT remap-dir (#PCDATA)>
120 as-path CDATA #REQUIRED
121 prefix (default|xdg|relative|cwd) "default"
122 xml:space (default|preserve) "preserve">
125 Reset the list of fonts directories
127 <!ELEMENT reset-dirs EMPTY>
130 Periodically rescan the font configuration and
131 directories to synch internal state with filesystem
133 <!ELEMENT rescan (int)>
136 Edit list of available fonts at startup/reload time
138 <!ELEMENT selectfont (rejectfont | acceptfont)* >
140 <!ELEMENT rejectfont (glob | pattern)*>
142 <!ELEMENT acceptfont (glob | pattern)*>
144 <!ELEMENT glob (#PCDATA)>
146 <!ELEMENT pattern (patelt)*>
148 <!ENTITY % constant 'int|double|string|matrix|bool|charset|langset|const'>
150 <!ELEMENT patelt (%constant;)*>
152 name CDATA #REQUIRED>
154 <!ELEMENT alias (test?, family*, prefer?, accept?, default?)>
156 binding (weak|strong|same) "weak">
157 <!ELEMENT prefer (family)*>
158 <!ELEMENT accept (family)*>
159 <!ELEMENT default (family)*>
160 <!ELEMENT family (#PCDATA)>
161 <!ATTLIST family xml:space (default|preserve) 'preserve'>
163 <!ENTITY % expr 'int|double|string|matrix|bool|charset|langset
165 |or|and|eq|not_eq|less|less_eq|more|more_eq|contains|not_contains
166 |plus|minus|times|divide|not|if|floor|ceil|round|trunc'>
169 Match and edit patterns.
171 If 'target' is 'pattern', execute the match before selecting a font.
172 if 'target' is 'font', execute the match on the result of a font
175 <!ELEMENT match (test|edit)+>
177 target (pattern|font|scan) "pattern">
180 Match a field in a pattern
182 if 'qual' is 'any', then the match succeeds if any value in the field matches.
183 if 'qual' is 'all', then the match succeeds only if all values match.
184 if 'qual' is 'first', then the match succeeds only if the first value matches.
185 if 'qual' is 'not_first', then the match succeeds only if any value other than
187 For match elements with target=font, if test 'target' is 'pattern',
188 then the test is applied to the pattern used in matching rather than
189 to the resulting font.
191 Match elements with target=scan are applied as fonts are scanned.
192 They edit the pattern generated from the scanned font and affect
193 what the fontconfig database contains.
195 <!ELEMENT test (%expr;)*>
197 qual (any|all|first|not_first) "any"
199 target (pattern|font|default) "default"
200 ignore-blanks (true|false) "false"
201 compare (eq|not_eq|less|less_eq|more|more_eq|contains|not_contains) "eq">
204 Edit a field in a pattern
206 The enclosed values are used together to edit the list of values
207 associated with 'name'.
209 If 'name' matches one of those used in a test element for this match element:
210 if 'mode' is 'assign', replace the matched value.
211 if 'mode' is 'assign_replace', replace all of the values
212 if 'mode' is 'prepend', insert before the matched value
213 if 'mode' is 'append', insert after the matched value
214 if 'mode' is 'prepend_first', insert before all of the values
215 if 'mode' is 'append_last', insert after all of the values
216 If 'name' doesn't match any of those used in a test element:
217 if 'mode' is 'assign' or 'assign_replace, replace all of the values
218 if 'mode' is 'prepend' or 'prepend_first', insert before all of the values
219 if 'mode' is 'append' or 'append_last', insert after all of the values
221 <!ELEMENT edit (%expr;)*>
224 mode (assign|assign_replace|prepend|append|prepend_first|append_last|delete|delete_all) "assign"
225 binding (weak|strong|same) "weak">
228 Elements of expressions follow
230 <!ELEMENT int (#PCDATA)>
231 <!ATTLIST int xml:space (default|preserve) 'preserve'>
232 <!ELEMENT double (#PCDATA)>
233 <!ATTLIST double xml:space (default|preserve) 'preserve'>
234 <!ELEMENT string (#PCDATA)>
235 <!ATTLIST string xml:space (default|preserve) 'preserve'>
236 <!ELEMENT matrix ((%expr;), (%expr;), (%expr;), (%expr;))>
237 <!ELEMENT bool (#PCDATA)>
238 <!ELEMENT charset (int|range)*>
239 <!ELEMENT range (int,int)>
240 <!ELEMENT langset (string)*>
241 <!ELEMENT name (#PCDATA)>
242 <!ATTLIST name xml:space (default|preserve) 'preserve'
243 target (default|font|pattern) 'default'>
244 <!ELEMENT const (#PCDATA)>
245 <!ATTLIST const xml:space (default|preserve) 'preserve'>
246 <!ELEMENT or (%expr;)*>
247 <!ELEMENT and (%expr;)*>
248 <!ELEMENT eq ((%expr;), (%expr;))>
249 <!ELEMENT not_eq ((%expr;), (%expr;))>
250 <!ELEMENT less ((%expr;), (%expr;))>
251 <!ELEMENT less_eq ((%expr;), (%expr;))>
252 <!ELEMENT more ((%expr;), (%expr;))>
253 <!ELEMENT more_eq ((%expr;), (%expr;))>
254 <!ELEMENT contains ((%expr;), (%expr;))>
255 <!ELEMENT not_contains ((%expr;), (%expr;))>
256 <!ELEMENT plus (%expr;)*>
257 <!ELEMENT minus (%expr;)*>
258 <!ELEMENT times (%expr;)*>
259 <!ELEMENT divide (%expr;)*>
260 <!ELEMENT not (%expr;)>
261 <!ELEMENT if ((%expr;), (%expr;), (%expr;))>
262 <!ELEMENT floor (%expr;)>
263 <!ELEMENT ceil (%expr;)>
264 <!ELEMENT round (%expr;)>
265 <!ELEMENT trunc (%expr;)>