]> git.wh0rd.org - fontconfig.git/blame - fonts.dtd
Fix conf.d directory sorting.
[fontconfig.git] / fonts.dtd
CommitLineData
24330d27
KP
1<!-- This is the Document Type Definition for font configuration files -->
2<!ELEMENT fontconfig (dir |
3 cache |
4 include |
5 config |
4f27c1c0 6 selectfont |
24330d27
KP
7 match |
8 alias)* >
9
10<!--
11 Add a directory that provides fonts
12-->
13<!ELEMENT dir (#PCDATA)>
14<!ATTLIST dir xml:space (default|preserve) 'preserve'>
15
16<!--
17 Define the per-user file that holds cache font information.
18
19 If the filename begins with '~', it is replaced with the users
20 home directory path.
21-->
22<!ELEMENT cache (#PCDATA)>
23<!ATTLIST cache xml:space (default|preserve) 'preserve'>
24
7410e40b
PL
25<!--
26 Add a directory that is searched for font cache files.
27 These hold per-directory cache data and are searched in
28 order for each directory. When writing cache files, the first
29 directory which allows the cache file to be created is used.
30
31 A leading '~' in a directory name is replaced with the users
32 home directory path.
33-->
34<!ELEMENT cachedir (#PCDATA)>
35<!ATTLIST cachedir xml:space (default|preserve) 'preserve'>
36
24330d27
KP
37<!--
38 Reference another configuration file; note that this
39 is another complete font configuration file and not
40 just a file included by the XML parser.
41
42 Set 'ignore_missing' to 'yes' if errors are to be ignored.
43
44 If the filename begins with '~', it is replaced with the users
45 home directory path.
46-->
47<!ELEMENT include (#PCDATA)>
48<!ATTLIST include
49 ignore_missing (no|yes) "no"
50 xml:space (default|preserve) "preserve">
51
52<!--
53 Global library configuration data
54 -->
1c20b1cc 55<!ELEMENT config (blank|rescan)*>
24330d27
KP
56
57<!--
58 Specify the set of Unicode encoding values which
59 represent glyphs that are allowed to contain no
60 data. With this list, fontconfig can examine
61 fonts for broken glyphs and eliminate them from
62 the set of valid Unicode chars. This idea
63 was borrowed from Mozilla
64 -->
1c20b1cc 65<!ELEMENT blank (int)*>
24330d27
KP
66
67<!--
68 Aliases are just a special case for multiple match elements
69
70 They are syntactically equivalent to:
71
72 <match>
73 <test name="family">
74 <string value=[family]/>
75 </test>
76 <edit name="family" mode="prepend">
77 <string value=[prefer]/>
78 ...
79 </edit>
80 <edit name="family" mode="append">
81 <string value=[accept]/>
82 ...
83 </edit>
84 <edit name="family" mode="append_last">
85 <string value=[default]/>
86 ...
87 </edit>
88 </match>
89-->
fb9545b1
KP
90<!--
91 Periodically rescan the font configuration and
92 directories to synch internal state with filesystem
93 -->
94<!ELEMENT rescan (int)>
95
4f27c1c0
KP
96<!--
97 Edit list of available fonts at startup/reload time
98 -->
99<!ELEMENT selectfont (rejectfont | acceptfont)* >
100
101<!ELEMENT rejectfont (glob | pattern)*>
102
103<!ELEMENT acceptfont (glob | pattern)*>
104
105<!ELEMENT glob (#PCDATA)>
106
107<!ELEMENT pattern (patelt)*>
108
109<!ELEMENT patelt (constant)*>
110<!ATTLIST patelt
111 name CDATA #REQUIRED>
112
113<!ELEMENT constant (int|double|string|matrix|bool|charset|const)>
fb9545b1
KP
114
115<!ELEMENT alias (family*, prefer?, accept?, default?)>
24330d27
KP
116<!ELEMENT prefer (family)*>
117<!ELEMENT accept (family)*>
118<!ELEMENT default (family)*>
119<!ELEMENT family (#PCDATA)>
120<!ATTLIST family xml:space (default|preserve) 'preserve'>
121
122<!ENTITY % expr 'int|double|string|matrix|bool|charset
123 |name|const
47d4f950 124 |or|and|eq|not_eq|less|less_eq|more|more_eq|contains|not_contains
3f7653c2 125 |plus|minus|times|divide|not|if|floor|ceil|round|trunc'>
24330d27
KP
126
127<!--
128 Match and edit patterns.
129
130 If 'target' is 'pattern', execute the match before selecting a font.
131 if 'target' is 'font', execute the match on the result of a font
132 selection.
133-->
134<!ELEMENT match (test*, edit*)>
135<!ATTLIST match
c2c6976d 136 target (pattern|font|scan) "pattern">
24330d27
KP
137
138<!--
139 Match a field in a pattern
140
141 if 'qual' is 'any', then the match succeeds if any value in the field matches.
142 if 'qual' is 'all', then the match succeeds only if all values match.
6f6563ed
KP
143 if 'qual' is 'first', then the match succeeds only if the first value matches.
144 if 'qual' is 'not_first', then the match succeeds only if any value other than
145 the first matches.
938bc633
KP
146 For match elements with target=font, if test 'target' is 'pattern',
147 then the test is applied to the pattern used in matching rather than
148 to the resulting font.
c2c6976d
KP
149
150 Match elements with target=scan are applied as fonts are scanned.
151 They edit the pattern generated from the scanned font and affect
152 what the fontconfig database contains.
24330d27 153-->
fb9545b1 154<!ELEMENT test (%expr;)*>
24330d27 155<!ATTLIST test
6f6563ed 156 qual (any|all|first|not_first) "any"
24330d27 157 name CDATA #REQUIRED
938bc633 158 target (pattern|font|default) "default"
47d4f950 159 compare (eq|not_eq|less|less_eq|more|more_eq|contains|not_contains) "eq">
24330d27
KP
160
161<!--
162 Edit a field in a pattern
163
164 The enclosed values are used together to edit the list of values
165 associated with 'name'.
166
167 If 'name' matches one of those used in a test element for this match element:
168 if 'mode' is 'assign', replace the matched value.
169 if 'mode' is 'assign_replace', replace all of the values
170 if 'mode' is 'prepend', insert before the matched value
171 if 'mode' is 'append', insert after the matched value
172 if 'mode' is 'prepend_first', insert before all of the values
173 if 'mode' is 'append_last', insert after all of the values
174 If 'name' doesn't match any of those used in a test element:
175 if 'mode' is 'assign' or 'assign_replace, replace all of the values
176 if 'mode' is 'prepend' or 'prepend_first', insert before all of the values
177 if 'mode' is 'append' or 'append_last', insert after all of the values
178-->
179<!ELEMENT edit (%expr;)*>
180<!ATTLIST edit
181 name CDATA #REQUIRED
6fff2cda 182 mode (assign|assign_replace|prepend|append|prepend_first|append_last) "assign"
dda7794f 183 binding (weak|strong|same) "weak">
24330d27
KP
184
185<!--
186 Elements of expressions follow
187-->
188<!ELEMENT int (#PCDATA)>
189<!ATTLIST int xml:space (default|preserve) 'preserve'>
190<!ELEMENT double (#PCDATA)>
191<!ATTLIST double xml:space (default|preserve) 'preserve'>
192<!ELEMENT string (#PCDATA)>
193<!ATTLIST string xml:space (default|preserve) 'preserve'>
194<!ELEMENT matrix (double,double,double,double)>
4515cf32 195<!ELEMENT bool (#PCDATA)>
24330d27
KP
196<!ELEMENT charset (#PCDATA)>
197<!ATTLIST charset xml:space (default|preserve) 'preserve'>
198<!ELEMENT name (#PCDATA)>
199<!ATTLIST name xml:space (default|preserve) 'preserve'>
200<!ELEMENT const (#PCDATA)>
201<!ATTLIST const xml:space (default|preserve) 'preserve'>
202<!ELEMENT or (%expr;)*>
203<!ELEMENT and (%expr;)*>
204<!ELEMENT eq ((%expr;), (%expr;))>
205<!ELEMENT not_eq ((%expr;), (%expr;))>
206<!ELEMENT less ((%expr;), (%expr;))>
207<!ELEMENT less_eq ((%expr;), (%expr;))>
208<!ELEMENT more ((%expr;), (%expr;))>
209<!ELEMENT more_eq ((%expr;), (%expr;))>
47d4f950
KP
210<!ELEMENT contains ((%expr;), (%expr;))>
211<!ELEMENT not_contains ((%expr;), (%expr;))>
24330d27
KP
212<!ELEMENT plus (%expr;)*>
213<!ELEMENT minus (%expr;)*>
214<!ELEMENT times (%expr;)*>
215<!ELEMENT divide (%expr;)*>
216<!ELEMENT not (%expr;)>
217<!ELEMENT if ((%expr;), (%expr;), (%expr;))>
3f7653c2
KP
218<!ELEMENT floor (%expr;)>
219<!ELEMENT ceil (%expr;)>
220<!ELEMENT round (%expr;)>
221<!ELEMENT trunc (%expr;)>