hintstyle Int Automatic hinting style
verticallayout Bool Use vertical layout
autohint Bool Use autohinter instead of normal hinter
- globaladvance Bool Use font global advance data
+ globaladvance Bool Use font global advance data (deprecated)
file String The filename holding the font
index Int The index of the font within the file
ftface FT_Face Use the specified FreeType face object
instead of -.5).
</para></refsect2>
<refsect2><title><literal><matrix></literal></title><para>
-This element holds the four <literal><double></literal> elements of an affine
-transformation.
+This element holds four numerical expressions of an affine transformation.
+At their simplest these will be four <literal><double></literal> elements
+but they can also be more involved expressions.
</para></refsect2>
<refsect2><title><literal><range></literal></title><para>
This element holds the two <literal><int></literal> elements of a range
</para></refsect2>
<refsect2><title><literal><name></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><const></literal></title><para>
Holds the name of a constant; these are always integers and serve as
</match>
<!--
- Names not including any well known alias are given 'sans'
+ Names not including any well known alias are given 'sans-serif'
-->
<match target="pattern">
- <test qual="all" name="family" mode="not_eq">sans</test>
- <test qual="all" name="family" mode="not_eq">serif</test>
- <test qual="all" name="family" mode="not_eq">monospace</test>
- <edit name="family" mode="append_last"><string>sans</string></edit>
+ <test qual="all" name="family" mode="not_eq"><string>sans-serif</string></test>
+ <test qual="all" name="family" mode="not_eq"><string>serif</string></test>
+ <test qual="all" name="family" mode="not_eq"><string>monospace</string></test>
+ <edit name="family" mode="append_last"><string>sans-serif</string></edit>
</match>
<!--
<family>monospace</family>
<prefer><family>Andale Mono</family></prefer>
</alias>
+
+<--
+ The example of the requirements of OR operator;
+ If the 'family' contains 'Courier New' OR 'Courier'
+ add 'monospace' as the alternative
+-->
+<match target="pattern">
+ <test name="family" mode="eq">
+ <string>Courier New</string>
+ </test>
+ <edit name="family" mode="prepend">
+ <string>monospace</string>
+ </edit>
+</match>
+<match target="pattern">
+ <test name="family" mode="eq">
+ <string>Courier</string>
+ </test>
+ <edit name="family" mode="prepend">
+ <string>monospace</string>
+ </edit>
+</match>
+
</fontconfig>
</programlisting>
</refsect2>
<match target="font">
<edit name="rgba" mode="assign"><const>rgb</const></edit>
</match>
+<!--
+ use WenQuanYi Zen Hei font when serif is requested for Chinese
+-->
+<match>
+ <!--
+ 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".
+ -->
+ <test name="lang" compare="contains">
+ <string>zh</string>
+ </test>
+ <test name="family">
+ <string>serif</string>
+ </test>
+ <edit name="family" mode="prepend">
+ <string>WenQuanYi Zen Hei</string>
+ </edit>
+</match>
+<!--
+ use VL Gothic font when sans-serif is requested for Japanese
+-->
+<match>
+ <test name="lang" compare="contains">
+ <string>ja</string>
+ </test>
+ <test name="family">
+ <string>sans-serif</string>
+ </test>
+ <edit name="family" mode="prepend">
+ <string>VL Gothic</string>
+ </edit>
+</match>
</fontconfig>
</programlisting>
</refsect2>