fonts.dtd 7.1 KB

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