Fix more warnings.
[platform/upstream/fontconfig.git] / doc / fontconfig-user.sgml
index 92d0db8..c842371 100644 (file)
@@ -434,8 +434,9 @@ zero for purely fractional values (e.g. use 0.5 instead of .5 and -0.5
 instead of -.5).
   </para></refsect2>
   <refsect2><title><literal>&lt;matrix&gt;</literal></title><para>
-This element holds the four <literal>&lt;double&gt;</literal> elements of an affine
-transformation.
+This element holds four numerical expressions of an affine transformation.
+At their simplest these will be four <literal>&lt;double&gt;</literal> elements
+but they can also be more involved expressions.
   </para></refsect2>
   <refsect2><title><literal>&lt;range&gt;</literal></title><para>
 This element holds the two <literal>&lt;int&gt;</literal> elements of a range
@@ -451,7 +452,12 @@ a RFC-3066-style languages or more.
   </para></refsect2>
   <refsect2><title><literal>&lt;name&gt;</literal></title><para>
 Holds a property name.  Evaluates to the first value from the property of
-the font, not the pattern.
+the pattern.  If the 'target' attribute is not present, it will default to
+'default', in which case the property is returned from the font pattern
+during a target="font" match, and to the pattern during a target="pattern"
+match.  The attribute can also take the values 'font' or 'pattern' to
+explicitly choose which pattern to use.  It is an error to use a target
+of 'font' in a match that has target="pattern".
   </para></refsect2>
   <refsect2><title><literal>&lt;const&gt;</literal></title><para>
 Holds the name of a constant; these are always integers and serve as
@@ -677,6 +683,41 @@ $XDG_CONFIG_HOME/fontconfig/fonts.conf
 &lt;match target="font"&gt;
        &lt;edit name="rgba" mode="assign"&gt;&lt;const&gt;rgb&lt;/const&gt;&lt;/edit&gt;
 &lt;/match&gt;
+&lt;!--
+       use WenQuanYi Zen Hei font when serif is requested for Chinese
+--&gt;
+&lt;match&gt;
+       &lt;!--
+               If you don't want to use WenQuanYi Zen Hei font for zh-tw etc,
+               you can use zh-cn instead of zh.
+               Please note, even if you set zh-cn, it still matches zh.
+               if you don't like it, you can use compare="eq"
+               instead of compare="contains".
+       --&gt;
+       &lt;test name="lang" compare="contains"&gt;
+               &lt;string&gt;zh&lt;/string&gt;
+       &lt;/test&gt;
+       &lt;test name="family"&gt;
+               &lt;string&gt;serif&lt;/string&gt;
+       &lt;/test&gt;
+       &lt;edit name="family" mode="prepend"&gt;
+               &lt;string&gt;WenQuanYi Zen Hei&lt;/string&gt;
+       &lt;/edit&gt;
+&lt;/match&gt;
+&lt;!--
+       use VL Gothic font when sans-serif is requested for Japanese
+--&gt;
+&lt;match&gt;
+       &lt;test name="lang" compare="contains"&gt;
+               &lt;string&gt;ja&lt;/string&gt;
+       &lt;/test&gt;
+       &lt;test name="family"&gt;
+               &lt;string&gt;sans-serif&lt;/string&gt;
+       &lt;/test&gt;
+       &lt;edit name="family" mode="prepend"&gt;
+               &lt;string&gt;VL Gothic&lt;/string&gt;
+       &lt;/edit&gt;
+&lt;/match&gt;
 &lt;/fontconfig&gt;
     </programlisting>
   </refsect2>