]> git.wh0rd.org - fontconfig.git/blobdiff - doc/fontconfig-user.sgml
Document FC_DEBUG values (bug 6393). Document name \ escape syntax.
[fontconfig.git] / doc / fontconfig-user.sgml
index 5e240ddd14ee841bd6c6b628506b21e5904efcb9..32a637c69a37c0146ca12835793220493a086da5 100644 (file)
@@ -3,8 +3,6 @@
 <!ENTITY confdir SYSTEM "confdir.sgml">
 ]>
 <!--
-    $Id$
-   
     Copyright © 2003 Keith Packard
    
     Permission to use, copy, modify, distribute, and sell this software and its
@@ -57,7 +55,7 @@ which accepts font patterns and returns the nearest matching font.
   <refsect2><title>Font Configuration</title>
     <para>
 The configuration module consists of the FcConfig datatype, libexpat and
-FcConfigParse which walks over an XML tree and ammends a configuration with
+FcConfigParse which walks over an XML tree and amends a configuration with
 data found within.  From an external perspective, configuration of the
 library consists of generating a valid XML tree and feeding that to
 FcConfigParse.  The only other mechanism provided to applications for
@@ -87,17 +85,17 @@ simplify and regularize font installation and customization.
 While font patterns may contain essentially any properties, there are some
 well known properties with associated types.  Fontconfig uses some of these
 properties for font matching and font completion.  Others are provided as a
-convenience for the applications rendering mechanism.
+convenience for the applications' rendering mechanism.
     </para>
     <programlisting>
   Property        Type    Description
   --------------------------------------------------------------
   family          String  Font family names
-  familylang      String  Languages cooresponding to each family
+  familylang      String  Languages corresponding to each family
   style           String  Font style. Overrides weight and slant
-  stylelang       String  Languages cooresponding to each style
+  stylelang       String  Languages corresponding to each style
   fullname        String  Font full names (often includes style)
-  fullnamelang    String  Languages cooresponding to each fullname
+  fullnamelang    String  Languages corresponding to each fullname
   slant           Int     Italic, oblique or roman
   weight          Int     Light, medium, demibold, bold or black
   size            Double  Point size
@@ -215,8 +213,46 @@ Here are some examples:
   Monospace:matrix=1 .1 0 1       The users preferred monospace font
                                   with artificial obliquing
     </programlisting>
+    <para>
+The '\', '-', ':' and ',' characters in family names must be preceeded by a
+'\' character to avoid having them misinterpreted. Similarly, values
+containing '\', '=', '_', ':' and ',' must also have them preceeded by a
+'\' character. The '\' characters are stripped out of the family name and
+values as the font name is read.
+    </para>
   </refsect2>
 </refsect1>
+<refsect1><title>Debugging Applications</title>
+  <para>
+To help diagnose font and applications problems, fontconfig is built with a
+large amount of internal debugging left enabled. It is controlled by means
+of the FC_DEBUG environment variable. The value of this variable is
+interpreted as a number, and each bit within that value controls different
+debugging messages.
+  </para>
+  <programlisting>
+  Name         Value    Meaning
+  ---------------------------------------------------------
+  MATCH            1    Brief information about font matching
+  MATCHV           2    Extensive font matching information
+  EDIT             4    Monitor match/test/edit execution
+  FONTSET          8    Track loading of font information at startup
+  CACHE           16    Watch cache files being written
+  CACHEV          32    Extensive cache file writing information
+  PARSE           64    (no longer in use)
+  SCAN           128    Watch font files being scanned to build caches
+  SCANV          256    Verbose font file scanning information
+  MEMORY         512    Monitor fontconfig memory usage
+  CONFIG        1024    Monitor which config files are loaded
+  LANGSET       2048    Dump char sets used to construct lang values
+  OBJTYPES      4096    Display message when value typechecks fail
+  </programlisting>
+  <para>
+Add the value of the desired debug levels together and assign that (in
+base 10) to the FC_DEBUG environment variable before running the
+application. Output from these statements is sent to stdout.
+  </para>
+</refsect1>
 <refsect1><title>Lang Tags</title>
   <para>
 Each font in the database contains a list of languages it supports.  This is
@@ -272,7 +308,7 @@ 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-<sgmltag>version</>'', where <sgmltag>version</> is the font configuration
-file version number (currently 1).
+file version number (currently 2).
   </para></refsect2>
   <refsect2><title><sgmltag>include ignore_missing="no"</></title><para>
 This element contains the name of an additional configuration file or
@@ -285,7 +321,7 @@ default "no", a missing file or directory will elicit no warning message from
 the library.
   </para></refsect2>
   <refsect2><title><sgmltag>config</></title><para>
-This element provides a place to consolodate additional configuration
+This element provides a place to consolidate additional configuration
 information.  <sgmltag>config</> can contain <sgmltag>blank</> and <sgmltag>rescan</> elements in any
 order.
   </para></refsect2>
@@ -324,7 +360,8 @@ 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
 font file types (*.pcf.gz), but the latter mechanism relies rather heavily
-on filenaming conventions which can't be relied upon.
+on filenaming conventions which can't be relied upon.  Note that globs
+only apply to directories, not to individual fonts.
   </para></refsect2>
   <refsect2><title><sgmltag>pattern</></title><para>
 Pattern elements perform list-style matching on incoming fonts; that is,
@@ -470,7 +507,7 @@ operations needed to substitute one font family for another.  They contain a
 <sgmltag>family</> element followed by optional <sgmltag>prefer</>, <sgmltag>accept</> and <sgmltag>default</>
 elements.  Fonts matching the <sgmltag>family</> element are edited to prepend the
 list of <sgmltag>prefer</>ed families before the matching <sgmltag>family</>, append the
-<sgmltag>accept</>able familys after the matching <sgmltag>family</> and append the <sgmltag>default</>
+<sgmltag>accept</>able families after the matching <sgmltag>family</> and append the <sgmltag>default</>
 families to the end of the family list.
   </para></refsect2>
   <refsect2><title><sgmltag>family</></title><para>