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