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