<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

	<!-- ##Style: common -->

	<!-- Prevent synthetic functions on bitmap / non-aa fonts.
			 This is done below by fooling fontconfig into thinking they are already
			 bold / italic.
	-->

	<match target="font">
		<test name="slant">
			<const>roman</const>
		</test>
		<test target="pattern" name="slant" compare="not_eq">
			<const>roman</const>
		</test>
		<test name="scalable">
			<bool>false</bool>
		</test>
		<edit name="slant" mode="assign">
			<const>oblique</const>
		</edit>
	</match>

	<match target="font">
		<test name="slant">
			<const>roman</const>
		</test>
		<test target="pattern" name="slant" compare="not_eq">
			<const>roman</const>
		</test>
		<test name="antialias">
			<bool>false</bool>
		</test>
		<edit name="slant" mode="assign">
			<const>oblique</const>
		</edit>
	</match>
	
	<match target="font">
		<test name="weight" compare="less_eq">
			<const>medium</const>
		</test>
		<test target="pattern" name="weight" compare="more">
			<const>medium</const>
		</test>
		<test name="scalable">
			<bool>false</bool>
		</test>
		<edit name="weight" mode="assign">
			<const>bold</const>
		</edit>
	</match>
	
	<match target="font">
		<test name="weight" compare="less_eq">
			<const>medium</const>
		</test>
		<test target="pattern" name="weight" compare="more">
			<const>medium</const>
		</test>
		<test name="antialias">
			<bool>false</bool>
		</test>
		<edit name="weight" mode="assign">
			<const>bold</const>
		</edit>
	</match>


	<!-- Prevent bold-ish fonts from being emboldened -->
	<match target="font">
		<test name="weight" compare="more_eq">
			<const>semibold</const>
		</test>
		<test target="pattern" name="weight">
			<const>bold</const>
		</test>
		<edit name="weight" mode="assign">
			<const>bold</const>
		</edit>
	</match>

	<!-- Prevent thin-ish fonts from being emboldened -->
	<match target="font">
		<test name="weight" compare="less">
			<const>book</const>
		</test>
		<test target="pattern" name="weight">
			<const>bold</const>
		</test>
		<edit name="weight" mode="assign">
			<const>bold</const>
		</edit>
	</match>


</fontconfig>
