fonts.dtd 6.7 KB

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