]>
Commit | Line | Data |
---|---|---|
24330d27 KP |
1 | <!-- This is the Document Type Definition for font configuration files --> |
2 | <!ELEMENT fontconfig (dir | | |
3 | cache | | |
4 | include | | |
5 | config | | |
6 | match | | |
7 | alias)* > | |
8 | ||
9 | <!-- | |
10 | Add a directory that provides fonts | |
11 | --> | |
12 | <!ELEMENT dir (#PCDATA)> | |
13 | <!ATTLIST dir xml:space (default|preserve) 'preserve'> | |
14 | ||
15 | <!-- | |
16 | Define the per-user file that holds cache font information. | |
17 | ||
18 | If the filename begins with '~', it is replaced with the users | |
19 | home directory path. | |
20 | --> | |
21 | <!ELEMENT cache (#PCDATA)> | |
22 | <!ATTLIST cache xml:space (default|preserve) 'preserve'> | |
23 | ||
24 | <!-- | |
25 | Reference another configuration file; note that this | |
26 | is another complete font configuration file and not | |
27 | just a file included by the XML parser. | |
28 | ||
29 | Set 'ignore_missing' to 'yes' if errors are to be ignored. | |
30 | ||
31 | If the filename begins with '~', it is replaced with the users | |
32 | home directory path. | |
33 | --> | |
34 | <!ELEMENT include (#PCDATA)> | |
35 | <!ATTLIST include | |
36 | ignore_missing (no|yes) "no" | |
37 | xml:space (default|preserve) "preserve"> | |
38 | ||
39 | <!-- | |
40 | Global library configuration data | |
41 | --> | |
fb9545b1 | 42 | <!ELEMENT config (blanks|rescan)*> |
24330d27 KP |
43 | |
44 | <!-- | |
45 | Specify the set of Unicode encoding values which | |
46 | represent glyphs that are allowed to contain no | |
47 | data. With this list, fontconfig can examine | |
48 | fonts for broken glyphs and eliminate them from | |
49 | the set of valid Unicode chars. This idea | |
50 | was borrowed from Mozilla | |
51 | --> | |
52 | <!ELEMENT blanks (int)*> | |
53 | ||
54 | <!-- | |
55 | Aliases are just a special case for multiple match elements | |
56 | ||
57 | They are syntactically equivalent to: | |
58 | ||
59 | <match> | |
60 | <test name="family"> | |
61 | <string value=[family]/> | |
62 | </test> | |
63 | <edit name="family" mode="prepend"> | |
64 | <string value=[prefer]/> | |
65 | ... | |
66 | </edit> | |
67 | <edit name="family" mode="append"> | |
68 | <string value=[accept]/> | |
69 | ... | |
70 | </edit> | |
71 | <edit name="family" mode="append_last"> | |
72 | <string value=[default]/> | |
73 | ... | |
74 | </edit> | |
75 | </match> | |
76 | --> | |
fb9545b1 KP |
77 | <!-- |
78 | Periodically rescan the font configuration and | |
79 | directories to synch internal state with filesystem | |
80 | --> | |
81 | <!ELEMENT rescan (int)> | |
82 | ||
83 | ||
84 | <!ELEMENT alias (family*, prefer?, accept?, default?)> | |
24330d27 KP |
85 | <!ELEMENT prefer (family)*> |
86 | <!ELEMENT accept (family)*> | |
87 | <!ELEMENT default (family)*> | |
88 | <!ELEMENT family (#PCDATA)> | |
89 | <!ATTLIST family xml:space (default|preserve) 'preserve'> | |
90 | ||
91 | <!ENTITY % expr 'int|double|string|matrix|bool|charset | |
92 | |name|const | |
93 | |or|and|eq|not_eq|less|less_eq|more|more_eq | |
94 | |plus|minus|times|divide|not|if'> | |
95 | ||
96 | <!-- | |
97 | Match and edit patterns. | |
98 | ||
99 | If 'target' is 'pattern', execute the match before selecting a font. | |
100 | if 'target' is 'font', execute the match on the result of a font | |
101 | selection. | |
102 | --> | |
103 | <!ELEMENT match (test*, edit*)> | |
104 | <!ATTLIST match | |
105 | target (pattern|font) "pattern"> | |
106 | ||
107 | <!-- | |
108 | Match a field in a pattern | |
109 | ||
110 | if 'qual' is 'any', then the match succeeds if any value in the field matches. | |
111 | if 'qual' is 'all', then the match succeeds only if all values match. | |
112 | --> | |
fb9545b1 | 113 | <!ELEMENT test (%expr;)*> |
24330d27 KP |
114 | <!ATTLIST test |
115 | qual (any|all) "any" | |
116 | name CDATA #REQUIRED | |
117 | compare (eq|not_eq|less|less_eq|more|more_eq) "eq"> | |
118 | ||
119 | <!-- | |
120 | Edit a field in a pattern | |
121 | ||
122 | The enclosed values are used together to edit the list of values | |
123 | associated with 'name'. | |
124 | ||
125 | If 'name' matches one of those used in a test element for this match element: | |
126 | if 'mode' is 'assign', replace the matched value. | |
127 | if 'mode' is 'assign_replace', replace all of the values | |
128 | if 'mode' is 'prepend', insert before the matched value | |
129 | if 'mode' is 'append', insert after the matched value | |
130 | if 'mode' is 'prepend_first', insert before all of the values | |
131 | if 'mode' is 'append_last', insert after all of the values | |
132 | If 'name' doesn't match any of those used in a test element: | |
133 | if 'mode' is 'assign' or 'assign_replace, replace all of the values | |
134 | if 'mode' is 'prepend' or 'prepend_first', insert before all of the values | |
135 | if 'mode' is 'append' or 'append_last', insert after all of the values | |
136 | --> | |
137 | <!ELEMENT edit (%expr;)*> | |
138 | <!ATTLIST edit | |
139 | name CDATA #REQUIRED | |
140 | mode (assign|assign_replace|prepend|append|prepend_first|append_last) "assign"> | |
141 | ||
142 | <!-- | |
143 | Elements of expressions follow | |
144 | --> | |
145 | <!ELEMENT int (#PCDATA)> | |
146 | <!ATTLIST int xml:space (default|preserve) 'preserve'> | |
147 | <!ELEMENT double (#PCDATA)> | |
148 | <!ATTLIST double xml:space (default|preserve) 'preserve'> | |
149 | <!ELEMENT string (#PCDATA)> | |
150 | <!ATTLIST string xml:space (default|preserve) 'preserve'> | |
151 | <!ELEMENT matrix (double,double,double,double)> | |
152 | <!ELEMENT bool (true|false)> | |
153 | <!ELEMENT charset (#PCDATA)> | |
154 | <!ATTLIST charset xml:space (default|preserve) 'preserve'> | |
155 | <!ELEMENT name (#PCDATA)> | |
156 | <!ATTLIST name xml:space (default|preserve) 'preserve'> | |
157 | <!ELEMENT const (#PCDATA)> | |
158 | <!ATTLIST const xml:space (default|preserve) 'preserve'> | |
159 | <!ELEMENT or (%expr;)*> | |
160 | <!ELEMENT and (%expr;)*> | |
161 | <!ELEMENT eq ((%expr;), (%expr;))> | |
162 | <!ELEMENT not_eq ((%expr;), (%expr;))> | |
163 | <!ELEMENT less ((%expr;), (%expr;))> | |
164 | <!ELEMENT less_eq ((%expr;), (%expr;))> | |
165 | <!ELEMENT more ((%expr;), (%expr;))> | |
166 | <!ELEMENT more_eq ((%expr;), (%expr;))> | |
167 | <!ELEMENT plus (%expr;)*> | |
168 | <!ELEMENT minus (%expr;)*> | |
169 | <!ELEMENT times (%expr;)*> | |
170 | <!ELEMENT divide (%expr;)*> | |
171 | <!ELEMENT not (%expr;)> | |
172 | <!ELEMENT if ((%expr;), (%expr;), (%expr;))> |