]> git.wh0rd.org - fontconfig.git/blame - fonts.dtd
Allow font caches to contain newer version numbers
[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
136 target (pattern|font) "pattern">
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.
24330d27 149-->
fb9545b1 150<!ELEMENT test (%expr;)*>
24330d27 151<!ATTLIST test
6f6563ed 152 qual (any|all|first|not_first) "any"
24330d27 153 name CDATA #REQUIRED
938bc633 154 target (pattern|font|default) "default"
47d4f950 155 compare (eq|not_eq|less|less_eq|more|more_eq|contains|not_contains) "eq">
24330d27
KP
156
157<!--
158 Edit a field in a pattern
159
160 The enclosed values are used together to edit the list of values
161 associated with 'name'.
162
163 If 'name' matches one of those used in a test element for this match element:
164 if 'mode' is 'assign', replace the matched value.
165 if 'mode' is 'assign_replace', replace all of the values
166 if 'mode' is 'prepend', insert before the matched value
167 if 'mode' is 'append', insert after the matched value
168 if 'mode' is 'prepend_first', insert before all of the values
169 if 'mode' is 'append_last', insert after all of the values
170 If 'name' doesn't match any of those used in a test element:
171 if 'mode' is 'assign' or 'assign_replace, replace all of the values
172 if 'mode' is 'prepend' or 'prepend_first', insert before all of the values
173 if 'mode' is 'append' or 'append_last', insert after all of the values
174-->
175<!ELEMENT edit (%expr;)*>
176<!ATTLIST edit
177 name CDATA #REQUIRED
6fff2cda 178 mode (assign|assign_replace|prepend|append|prepend_first|append_last) "assign"
dda7794f 179 binding (weak|strong|same) "weak">
24330d27
KP
180
181<!--
182 Elements of expressions follow
183-->
184<!ELEMENT int (#PCDATA)>
185<!ATTLIST int xml:space (default|preserve) 'preserve'>
186<!ELEMENT double (#PCDATA)>
187<!ATTLIST double xml:space (default|preserve) 'preserve'>
188<!ELEMENT string (#PCDATA)>
189<!ATTLIST string xml:space (default|preserve) 'preserve'>
190<!ELEMENT matrix (double,double,double,double)>
4515cf32 191<!ELEMENT bool (#PCDATA)>
24330d27
KP
192<!ELEMENT charset (#PCDATA)>
193<!ATTLIST charset xml:space (default|preserve) 'preserve'>
194<!ELEMENT name (#PCDATA)>
195<!ATTLIST name xml:space (default|preserve) 'preserve'>
196<!ELEMENT const (#PCDATA)>
197<!ATTLIST const xml:space (default|preserve) 'preserve'>
198<!ELEMENT or (%expr;)*>
199<!ELEMENT and (%expr;)*>
200<!ELEMENT eq ((%expr;), (%expr;))>
201<!ELEMENT not_eq ((%expr;), (%expr;))>
202<!ELEMENT less ((%expr;), (%expr;))>
203<!ELEMENT less_eq ((%expr;), (%expr;))>
204<!ELEMENT more ((%expr;), (%expr;))>
205<!ELEMENT more_eq ((%expr;), (%expr;))>
47d4f950
KP
206<!ELEMENT contains ((%expr;), (%expr;))>
207<!ELEMENT not_contains ((%expr;), (%expr;))>
24330d27
KP
208<!ELEMENT plus (%expr;)*>
209<!ELEMENT minus (%expr;)*>
210<!ELEMENT times (%expr;)*>
211<!ELEMENT divide (%expr;)*>
212<!ELEMENT not (%expr;)>
213<!ELEMENT if ((%expr;), (%expr;), (%expr;))>
3f7653c2
KP
214<!ELEMENT floor (%expr;)>
215<!ELEMENT ceil (%expr;)>
216<!ELEMENT round (%expr;)>
217<!ELEMENT trunc (%expr;)>