From b1aa20098f641a16d02e70a161450e6b85afe410 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Sat, 2 Dec 2006 14:28:03 -0800 Subject: [PATCH] Use instead of when documenting fonts.conf. Bug 8935. --- doc/fontconfig-user.sgml | 87 ++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/doc/fontconfig-user.sgml b/doc/fontconfig-user.sgml index a1f6b39..1007782 100644 --- a/doc/fontconfig-user.sgml +++ b/doc/fontconfig-user.sgml @@ -295,22 +295,22 @@ following structure: <literal><fontconfig></literal> This is the top level element for a font configuration and can contain -dir, cache, include, match and alias elements in any order. +<dir>, <cache>, <include>, <match> and <alias> elements in any order. - <sgmltag>dir</> + <literal><dir></literal> This element contains a directory name which will be scanned for font files to include in the set of available fonts. - <sgmltag>cache</> + <literal><cache></literal> This element contains a file name for the per-user cache of font information. If it starts with '~', it refers to a file in the users home directory. This file is used to hold information about fonts that isn't present in the per-directory cache files. It is automatically maintained by the fontconfig library. The default for this file -is ``~/.fonts.cache-version'', where version is the font configuration +is ``~/.fonts.cache-<version>'', where <version> is the font configuration file version number (currently 2). - <sgmltag>include ignore_missing="no"</> + <literal><include ignore_missing="no"></literal> This element contains the name of an additional configuration file or directory. If a directory, every file within that directory starting with an ASCII digit (U+0030 - U+0039) and ending with the string ``.conf'' will be processed in sorted order. When @@ -320,42 +320,42 @@ FcConfigLoadAndParse. If 'ignore_missing' is set to "yes" instead of the default "no", a missing file or directory will elicit no warning message from the library. - <sgmltag>config</> + <literal><config></literal> This element provides a place to consolidate additional configuration -information. config can contain blank and rescan elements in any +information. <config> can contain <blank> and <rescan> elements in any order. - <sgmltag>blank</> + <literal><blank></literal> Fonts often include "broken" glyphs which appear in the encoding but are -drawn as blanks on the screen. Within the blank element, place each -Unicode characters which is supposed to be blank in an int element. +drawn as blanks on the screen. Within the <blank> element, place each +Unicode characters which is supposed to be blank in an <int> element. Characters outside of this set which are drawn as blank will be elided from the set of characters supported by the font. - <sgmltag>rescan</> -The rescan element holds an int element which indicates the default + <literal><rescan></literal> +The <rescan> element holds an <int> element which indicates the default interval between automatic checks for font configuration changes. Fontconfig will validate all of the configuration files and directories and automatically rebuild the internal datastructures when this interval passes. - <sgmltag>selectfont</> + <literal><selectfont></literal> This element is used to black/white list fonts from being listed or matched against. It holds acceptfont and rejectfont elements. - <sgmltag>acceptfont</> + <literal><acceptfont></literal> Fonts matched by an acceptfont element are "whitelisted"; such fonts are explicitly included in the set of fonts used to resolve list and match requests; including them in this list protects them from being "blacklisted" by a rejectfont element. Acceptfont elements include glob and pattern elements which are used to match fonts. - <sgmltag>rejectfont</> + <literal><rejectfont></literal> Fonts matched by an rejectfont element are "blacklisted"; such fonts are excluded from the set of fonts used to resolve list and match requests as if they didn't exist in the system. Rejectfont elements include glob and pattern elements which are used to match fonts. - <sgmltag>glob</> + <literal><glob></literal> Glob elements hold shell-style filename matching patterns (including ? and *) which match fonts based on their complete pathnames. This can be used to exclude a set of directories (/usr/share/fonts/uglyfont*), or particular @@ -363,7 +363,7 @@ font file types (*.pcf.gz), but the latter mechanism relies rather heavily on filenaming conventions which can't be relied upon. Note that globs only apply to directories, not to individual fonts. - <sgmltag>pattern</> + <literal><pattern></literal> Pattern elements perform list-style matching on incoming fonts; that is, they hold a list of elements and associated values. If all of those elements have a matching value, then the pattern matches the font. This can @@ -371,22 +371,22 @@ be used to select fonts based on attributes of the font (scalable, bold, etc), which is a more reliable mechanism than using file extensions. Pattern elements include patelt elements. - <sgmltag>patelt name="property"</> + <literal><patelt name="property"></literal> Patelt elements hold a single pattern element and list of values. They must have a 'name' attribute which indicates the pattern element name. Patelt elements include int, double, string, matrix, bool, charset and const elements. - <sgmltag>match target="pattern"</> -This element holds first a (possibly empty) list of test elements and then -a (possibly empty) list of edit elements. Patterns which match all of the + <literal><match target="pattern"></literal> +This element holds first a (possibly empty) list of <test> elements and then +a (possibly empty) list of <edit> elements. Patterns which match all of the tests are subjected to all the edits. If 'target' is set to "font" instead of the default "pattern", then this element applies to the font name resulting from a match rather than a font pattern to be matched. If 'target' is set to "scan", then this element applies when the font is scanned to build the fontconfig database. - <sgmltag>test qual="any" name="property" target="default" compare="eq"</> + <literal><test qual="any" name="property" target="default" compare="eq"></literal> This element contains a single value which is compared with the target ('pattern', 'font', 'scan' or 'default') property "property" (substitute any of the property names seen above). 'compare' can be one of "eq", "not_eq", "less", "less_eq", "more", or @@ -398,11 +398,11 @@ the target= attribute in the <test> element selects between matching the original pattern or the font. "default" selects whichever target the outer <match> element has selected. - <sgmltag>edit name="property" mode="assign" binding="weak"</> + <literal><edit name="property" mode="assign" binding="weak"></literal> This element contains a list of expression elements (any of the value or operator elements). The expression elements are evaluated at run-time and modify the property "property". The modification depends on whether -"property" was matched by one of the associated test elements, if so, the +"property" was matched by one of the associated <test> elements, if so, the modification may affect the first matched value. Any values inserted into the property are given the indicated binding ("strong", "weak" or "same") with "same" binding using the value from the matched pattern element. @@ -418,23 +418,23 @@ with "same" binding using the value from the matched pattern element. "append_last" Append at end of list Append at end of list - <sgmltag>int</>, <sgmltag>double</>, <sgmltag>string</>, <sgmltag>bool</> -These elements hold a single value of the indicated type. bool + <literal><int></literal>, <literal><double></literal>, <literal><string></literal>, <literal><bool></literal> +These elements hold a single value of the indicated type. <bool> elements hold either true or false. An important limitation exists in the parsing of floating point numbers -- fontconfig requires that the mantissa start with a digit, not a decimal point, so insert a leading zero for purely fractional values (e.g. use 0.5 instead of .5 and -0.5 instead of -.5). - <sgmltag>matrix</> -This element holds the four double elements of an affine + <literal><matrix></literal> +This element holds the four <double> elements of an affine transformation. - <sgmltag>name</> + <literal><name></literal> Holds a property name. Evaluates to the first value from the property of the font, not the pattern. - <sgmltag>const</> + <literal><const></literal> Holds the name of a constant; these are always integers and serve as symbolic names for common font values: @@ -484,40 +484,39 @@ symbolic names for common font values: - <sgmltag>or</>, <sgmltag>and</>, <sgmltag>plus</>, <sgmltag>minus</>, <sgmltag>times</>, <sgmltag>divide</> + <literal><or></literal>, <literal><and></literal>, <literal><plus></literal>, <literal><minus></literal>, <literal><times></literal>, <literal><divide></literal> These elements perform the specified operation on a list of expression -elements. or and and are boolean, not bitwise. +elements. <or> and <and> are boolean, not bitwise. - <sgmltag>eq</>, <sgmltag>not_eq</>, <sgmltag>less</>, <sgmltag>less_eq</>, <sgmltag>more</>, <sgmltag>more_eq</> + <literal><eq></literal>, <literal><not_eq></literal>, <literal><less></literal>, <literal><less_eq></literal>, <literal><more></literal>, <literal><more_eq></literal> These elements compare two values, producing a boolean result. - <sgmltag>not</> + <literal><not></literal> Inverts the boolean sense of its one expression element - <sgmltag>if</> + <literal><if></literal> This element takes three expression elements; if the value of the first is true, it produces the value of the second, otherwise it produces the value of the third. - <sgmltag>alias</> + <literal><alias></literal> Alias elements provide a shorthand notation for the set of common match operations needed to substitute one font family for another. They contain a -family element followed by optional prefer, accept and default -elements. Fonts matching the family element are edited to prepend the -list of prefered families before the matching family, append the -acceptable families after the matching family and append the default +<family> element followed by optional <prefer>, <accept> and <default> +elements. Fonts matching the <family> element are edited to prepend the +list of <prefer>ed families before the matching <family>, append the +<accept>able families after the matching <family> and append the <default> families to the end of the family list. - <sgmltag>family</> + <literal><family></literal> Holds a single font family name - <sgmltag>prefer</>, <sgmltag>accept</>, <sgmltag>default</> -These hold a list of family elements to be used by the alias element. -/article + <literal><prefer></literal>, <literal><accept></literal>, <literal><default></literal> +These hold a list of <family> elements to be used by the <alias> element. EXAMPLE CONFIGURATION FILE