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