<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <!-- disabling hinting rule for bigger size-->
    <match target="font">
        <test name="family" compare="eq">
                <string>ZenJia Hei</string>
        </test>
        <test name="pixelsize" compare="more_eq">
                <double>12</double>
        </test>
        <edit name="hinting" mode="assign">
                <bool>false</bool>
        </edit>
    </match>
    <!-- enable embolden for ZenJia Hei -->
    <match target="font">
        <test name="family" compare="contains">
                <string>ZenJia Hei</string>
        </test>
        <test compare="more_eq" target="pattern" name="weight">
                <int>180</int>	
        </test>
        <edit mode="assign" name="embolden">
                <bool>true</bool>
        </edit>
    </match>
    <!-- Locale-specific overrides rule for sans-serif generic family -->
    <match>
        <test name="lang" compare="contains">
                <string>zh-tw</string>
        </test>
        <test name="family" compare="eq">
                <string>sans-serif</string>
        </test>
        <edit name="family" mode="prepend">
                <string>ZenJia Hei</string>
        </edit>
    </match>
    <!-- set Chinese name for ZenJia Hei -->
    <alias>
        <family>靜嘉黑體</family>
        <accept>
                <family>ZenJia Hei</family>
        </accept>
        <default>
                <family>sans-serif</family>
        </default>      
    </alias>
    <!-- fallback sequence for ZenJia Hei -->
    <alias>
        <family>ZenJia Hei</family>
        <accept>
                <family>VL PGothic</family>
                <family>Droid Sans Japanese</family>
        </accept>
        <default>
                <family>sans-serif</family>
        </default>      
    </alias>
    <!-- use ZenJia Hei font when Cantarell is requested for traditional Chinese -->
    <alias>
        <family>Cantarell</family>
        <accept>
                <family>ZenJia Hei</family>
        </accept>
        <default>
                <family>sans-serif</family>
        </default> 
    </alias>
</fontconfig>
