Bug 63399 - Add default aliases for Georgia, Garamond, Palatino Linotype, Trebuchet MS
[platform/upstream/fontconfig.git] / fonts.dtd
index a6aedbb..4c38e77 100644 (file)
--- a/fonts.dtd
+++ b/fonts.dtd
@@ -1,8 +1,10 @@
 <!-- This is the Document Type Definition for font configuration files -->
 <!ELEMENT fontconfig (dir | 
                      cache | 
 <!-- This is the Document Type Definition for font configuration files -->
 <!ELEMENT fontconfig (dir | 
                      cache | 
+                     cachedir |
                      include | 
                      config |
                      include | 
                      config |
+                     selectfont |
                      match | 
                      alias)* >
 
                      match | 
                      alias)* >
 
@@ -10,7 +12,9 @@
     Add a directory that provides fonts
 -->
 <!ELEMENT dir (#PCDATA)>
     Add a directory that provides fonts
 -->
 <!ELEMENT dir (#PCDATA)>
-<!ATTLIST dir xml:space (default|preserve) 'preserve'>
+<!ATTLIST dir
+         prefix    CDATA       "default"
+         xml:space (default|preserve) 'preserve'>
 
 <!--
     Define the per-user file that holds cache font information.
 
 <!--
     Define the per-user file that holds cache font information.
 <!ATTLIST cache xml:space (default|preserve) 'preserve'>
 
 <!--
 <!ATTLIST cache xml:space (default|preserve) 'preserve'>
 
 <!--
+    Add a directory that is searched for font cache files.
+    These hold per-directory cache data and are searched in
+    order for each directory. When writing cache files, the first
+    directory which allows the cache file to be created is used.
+
+    A leading '~' in a directory name is replaced with the users
+    home directory path.
+-->
+<!ELEMENT cachedir (#PCDATA)>
+<!ATTLIST cachedir
+         prefix    CDATA      "default"
+         xml:space (default|preserve) 'preserve'>
+
+<!--
     Reference another configuration file; note that this
     is another complete font configuration file and not
     just a file included by the XML parser.
     Reference another configuration file; note that this
     is another complete font configuration file and not
     just a file included by the XML parser.
@@ -34,6 +52,8 @@
 <!ELEMENT include (#PCDATA)>
 <!ATTLIST include
          ignore_missing    (no|yes)            "no"
 <!ELEMENT include (#PCDATA)>
 <!ATTLIST include
          ignore_missing    (no|yes)            "no"
+         prefix            CDATA               "default"
+         deprecated        (yes|no)            "no"
          xml:space         (default|preserve)  "preserve">
 
 <!--
          xml:space         (default|preserve)  "preserve">
 
 <!--
@@ -49,7 +69,7 @@
     the set of valid Unicode chars.  This idea
     was borrowed from Mozilla
  -->
     the set of valid Unicode chars.  This idea
     was borrowed from Mozilla
  -->
-<!ELEMENT blank (int)*>
+<!ELEMENT blank (int|range)*>
 
 <!--
     Aliases are just a special case for multiple match elements
 
 <!--
     Aliases are just a special case for multiple match elements
  -->
 <!ELEMENT rescan (int)>
 
  -->
 <!ELEMENT rescan (int)>
 
+<!--
+    Edit list of available fonts at startup/reload time
+ -->
+<!ELEMENT selectfont (rejectfont | acceptfont)* >
+
+<!ELEMENT rejectfont (glob | pattern)*>
+
+<!ELEMENT acceptfont (glob | pattern)*>
+
+<!ELEMENT glob (#PCDATA)>
+
+<!ELEMENT pattern (patelt)*>
 
 
-<!ELEMENT alias (family*, prefer?, accept?, default?)>
+<!ENTITY % constant 'int|double|string|matrix|bool|charset|langset|const'>
+
+<!ELEMENT patelt (%constant;)*>
+<!ATTLIST patelt
+         name CDATA    #REQUIRED>
+
+<!ELEMENT alias (test?, family*, prefer?, accept?, default?)>
+<!ATTLIST alias
+         binding (weak|strong|same) "weak">
 <!ELEMENT prefer (family)*>
 <!ELEMENT accept (family)*>
 <!ELEMENT default (family)*>
 <!ELEMENT family (#PCDATA)>
 <!ATTLIST family xml:space (default|preserve) 'preserve'>
 
 <!ELEMENT prefer (family)*>
 <!ELEMENT accept (family)*>
 <!ELEMENT default (family)*>
 <!ELEMENT family (#PCDATA)>
 <!ATTLIST family xml:space (default|preserve) 'preserve'>
 
-<!ENTITY % expr 'int|double|string|matrix|bool|charset
+<!ENTITY % expr 'int|double|string|matrix|bool|charset|langset
                |name|const
                |name|const
-               |or|and|eq|not_eq|less|less_eq|more|more_eq
-               |plus|minus|times|divide|not|if'>
+               |or|and|eq|not_eq|less|less_eq|more|more_eq|contains|not_contains
+               |plus|minus|times|divide|not|if|floor|ceil|round|trunc'>
 
 <!--
     Match and edit patterns.
 
 <!--
     Match and edit patterns.
     if 'target' is 'font', execute the match on the result of a font
     selection.
 -->
     if 'target' is 'font', execute the match on the result of a font
     selection.
 -->
-<!ELEMENT match (test*, edit*)>
+<!ELEMENT match (test*, edit*)+>
 <!ATTLIST match
 <!ATTLIST match
-         target (pattern|font) "pattern">
+         target (pattern|font|scan) "pattern">
 
 <!--
     Match a field in a pattern
 
 <!--
     Match a field in a pattern
     if 'qual' is 'first', then the match succeeds only if the first value matches.
     if 'qual' is 'not_first', then the match succeeds only if any value other than
        the first matches.
     if 'qual' is 'first', then the match succeeds only if the first value matches.
     if 'qual' is 'not_first', then the match succeeds only if any value other than
        the first matches.
+    For match elements with target=font, if test 'target' is 'pattern',
+    then the test is applied to the pattern used in matching rather than
+    to the resulting font.
+
+    Match elements with target=scan are applied as fonts are scanned.
+    They edit the pattern generated from the scanned font and affect
+    what the fontconfig database contains.
 -->
 <!ELEMENT test (%expr;)*>
 <!ATTLIST test 
          qual (any|all|first|not_first)    "any"
          name CDATA        #REQUIRED
 -->
 <!ELEMENT test (%expr;)*>
 <!ATTLIST test 
          qual (any|all|first|not_first)    "any"
          name CDATA        #REQUIRED
-         compare (eq|not_eq|less|less_eq|more|more_eq) "eq">
+         target (pattern|font|default)         "default"
+         ignore-blanks (true|false)    "false"
+         compare (eq|not_eq|less|less_eq|more|more_eq|contains|not_contains)   "eq">
 
 <!--
     Edit a field in a pattern
 
 <!--
     Edit a field in a pattern
 <!ELEMENT edit (%expr;)*>
 <!ATTLIST edit
          name CDATA        #REQUIRED
 <!ELEMENT edit (%expr;)*>
 <!ATTLIST edit
          name CDATA        #REQUIRED
-         mode (assign|assign_replace|prepend|append|prepend_first|append_last) "assign"
-         binding (weak|strong) "weak">
+         mode (assign|assign_replace|prepend|append|prepend_first|append_last|delete|delete_all) "assign"
+         binding (weak|strong|same) "weak">
 
 <!--
     Elements of expressions follow
 
 <!--
     Elements of expressions follow
 <!ATTLIST double xml:space (default|preserve) 'preserve'>
 <!ELEMENT string (#PCDATA)>
 <!ATTLIST string xml:space (default|preserve) 'preserve'>
 <!ATTLIST double xml:space (default|preserve) 'preserve'>
 <!ELEMENT string (#PCDATA)>
 <!ATTLIST string xml:space (default|preserve) 'preserve'>
-<!ELEMENT matrix (double,double,double,double)>
-<!ELEMENT bool (true|false)>
-<!ELEMENT charset (#PCDATA)>
-<!ATTLIST charset xml:space (default|preserve) 'preserve'>
+<!ELEMENT matrix ((%expr;), (%expr;), (%expr;), (%expr;))>
+<!ELEMENT bool (#PCDATA)>
+<!ELEMENT charset (int|range)*>
+<!ELEMENT range (int,int)>
+<!ELEMENT langset (string)*>
 <!ELEMENT name (#PCDATA)>
 <!ELEMENT name (#PCDATA)>
-<!ATTLIST name xml:space (default|preserve) 'preserve'>
+<!ATTLIST name xml:space (default|preserve) 'preserve'
+         target (default|font|pattern) 'default'>
 <!ELEMENT const (#PCDATA)>
 <!ATTLIST const xml:space (default|preserve) 'preserve'>
 <!ELEMENT or (%expr;)*>
 <!ELEMENT const (#PCDATA)>
 <!ATTLIST const xml:space (default|preserve) 'preserve'>
 <!ELEMENT or (%expr;)*>
 <!ELEMENT less_eq ((%expr;), (%expr;))>
 <!ELEMENT more ((%expr;), (%expr;))>
 <!ELEMENT more_eq ((%expr;), (%expr;))>
 <!ELEMENT less_eq ((%expr;), (%expr;))>
 <!ELEMENT more ((%expr;), (%expr;))>
 <!ELEMENT more_eq ((%expr;), (%expr;))>
+<!ELEMENT contains ((%expr;), (%expr;))>
+<!ELEMENT not_contains ((%expr;), (%expr;))>
 <!ELEMENT plus (%expr;)*>
 <!ELEMENT minus (%expr;)*>
 <!ELEMENT times (%expr;)*>
 <!ELEMENT divide (%expr;)*>
 <!ELEMENT not (%expr;)>
 <!ELEMENT if ((%expr;), (%expr;), (%expr;))>
 <!ELEMENT plus (%expr;)*>
 <!ELEMENT minus (%expr;)*>
 <!ELEMENT times (%expr;)*>
 <!ELEMENT divide (%expr;)*>
 <!ELEMENT not (%expr;)>
 <!ELEMENT if ((%expr;), (%expr;), (%expr;))>
+<!ELEMENT floor (%expr;)>
+<!ELEMENT ceil (%expr;)>
+<!ELEMENT round (%expr;)>
+<!ELEMENT trunc (%expr;)>