<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
	<!--
	  Editing properties for all WenQuanYi fonts
	  Testing command:
	    fc-match -v "FONTFAMILY:size=NN" | grep -Ev "[0-9a-f]{4}:"
	-->

	<match target="font">
		<test name="family" compare="eq">
			<string>WenQuanYi Bitmap Song</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>Unibit</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>WenQuanYi Zen Hei</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驿正黑</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驛正黑</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>WenQuanYi Zen Hei Sharp</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驿点阵正黑</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驛點陣正黑</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>WenQuanYi Zen Hei Mono</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驿等宽正黑</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驛等寬正黑</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>WenQuanYi Micro Hei Mono</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>WenQuanYi Micro Hei Mono Light</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驿等宽微米黑</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驛等寬微米黑</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>WenQuanYi Micro Hei</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>WenQuanYi Micro Hei Light</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驿微米黑</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驛微米黑</string>
		</test>
		<edit name="antialias"><bool>true</bool></edit>
		<edit name="hinting"><bool>true</bool></edit>
		<edit name="autohint"><bool>true</bool></edit>
		<edit name="embeddedbitmap"><bool>true</bool></edit>
		<edit name="spacing"><const>proportional</const></edit>
		<edit name="globaladvance"><bool>false</bool></edit>
        </match>

	<!--
	  Editing properties for bitmap fonts to avoid fuzzy display
	  Testing command:
	    fc-match -v "FONTFAMILY:size=NN" | grep -iE "family|alias|size"
	-->

	<match target="font">
		<test name="family" compare="eq">
			<string>WenQuanYi Bitmap Song</string>
		</test>
                <test name="size" compare="less_eq"><int>16</int></test>
                <edit name="antialias" mode="assign"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>Unibit</string>
		</test>
                <test name="size" compare="less_eq"><int>16</int></test>
                <edit name="antialias" mode="assign"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驿点阵正黑</string>
		</test>
                <test name="size" compare="less_eq"><int>16</int></test>
                <edit name="antialias" mode="assign"><bool>false</bool></edit>
        </match>

	<match target="font">
		<test name="family" compare="eq">
			<string>文泉驛點陣正黑</string>
		</test>
                <test name="size" compare="less_eq"><int>16</int></test>
                <edit name="antialias" mode="assign"><bool>false</bool></edit>
        </match>
	
	<match target="font">
		<test name="family" compare="eq">
			<string>WenQuanYi Zen Hei Sharp</string>
		</test>
                <test name="size" compare="less_eq"><int>16</int></test>
                <edit name="antialias" mode="assign"><bool>false</bool></edit>
        </match>

	<!--
	  Prior use WenQuanYi Zen Hei Sharp for Chinese Han
	  Testing command:
	    fc-match -s "FONTFAMILY:familylang=LL" | head -n 5
	-->

	<match target="pattern">
		<test name="family" compare="eq"><string>serif</string></test>
		<test name="familylang" compare="eq"><string>zh-cn</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>

	<match target="pattern">
		<test name="family" compare="eq"><string>serif</string></test>
		<test name="familylang" compare="eq"><string>zh-tw</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>

	<match target="pattern">
		<test name="family" compare="eq"><string>serif</string></test>
		<test name="familylang" compare="eq"><string>zh-hk</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>
	
	<match target="pattern">
		<test name="family" compare="eq"><string>serif</string></test>
		<test name="familylang" compare="eq"><string>zh-sg</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>

	<match target="pattern">
		<test name="family" compare="eq"><string>sans-serif</string></test>
		<test name="familylang" compare="eq"><string>zh-cn</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>

	<match target="pattern">
		<test name="family" compare="eq"><string>sans-serif</string></test>
		<test name="familylang" compare="eq"><string>zh-tw</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>

	<match target="pattern">
		<test name="family" compare="eq"><string>sans-serif</string></test>
		<test name="familylang" compare="eq"><string>zh-hk</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>
	
	<match target="pattern">
		<test name="family" compare="eq"><string>sans-serif</string></test>
		<test name="familylang" compare="eq"><string>zh-sg</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>
	
	<match target="pattern">
		<test name="family" compare="eq"><string>monospace</string></test>
		<test name="familylang" compare="eq"><string>zh-cn</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>

	<match target="pattern">
		<test name="family" compare="eq"><string>monospace</string></test>
		<test name="familylang" compare="eq"><string>zh-tw</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>

	<match target="pattern">
		<test name="family" compare="eq"><string>monospace</string></test>
		<test name="familylang" compare="eq"><string>zh-hk</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>
	
	<match target="pattern">
		<test name="family" compare="eq"><string>monospace</string></test>
		<test name="familylang" compare="eq"><string>zh-sg</string></test>
		<edit name="family" mode="prepend_first">
			<string>WenQuanYi Zen Hei Sharp</string>
		</edit>
	</match>

</fontconfig>
