<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
	<!-- lang defaults to ko -->
	<match target="pattern">
		<test compare="eq" name="lang" qual="all">
			<string>unset</string>
		</test>
		<edit name="lang">
			<string>ko</string>
		</edit>
	</match>

	<!-- en also can be shown by ko -->
	<match target="pattern">
		<test compare="eq" name="lang">
			<string>en</string>
		</test>
		<edit name="lang" mode="append">
			<string>ko</string>
		</edit>
	</match>

	<!-- Prefer using Nanum fonts -->
	<alias>
		<family>serif</family>
		<prefer>
			<family>NanumMyeongjo</family>
		</prefer>
	</alias>
	<alias>
		<family>sans-serif</family>
		<prefer>
 			<family>NanumGothic</family>
		</prefer>
	</alias>
	<alias>
		<family>monospace</family>
		<prefer>
			<family>NanumGothicCoding</family>
		</prefer>
	</alias>

	<!-- Force the use of Nanum fonts as defaults -->
	<match target="pattern">
		<test name="family"><string>serif</string></test>
		<edit mode="prepend" binding="strong" name="family">
			<string>NanumMyeongjo</string>
		</edit>
	</match>
	<match target="pattern">
		<test name="family"><string>sans-serif</string></test>
		<edit mode="prepend" binding="strong" name="family">
			<string>NanumGothic</string>
		</edit>
	</match>
	<match target="pattern">
		<test name="family"><string>monospace</string></test>
		<edit mode="prepend" binding="strong" name="family">
			<string>NanumGothicCoding</string>
		</edit>
	</match>

	<!-- Turn hinting on (BCI off) for included fonts -->
	<match target="font">
		<test name="family" qual="any">
			<string>NanumMyeongjo</string>
			<string>NanumGothic</string>
			<string>NanumGothicCoding</string>
		</test>
		<edit mode="assign" name="hinting"><bool>true</bool></edit>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<edit mode="assign" name="autohint"><bool>false</bool></edit>
	</match>

	<!--
	     To do subpixel rendering, we need duganchen's patches:
	     https://github.com/duganchen/slackware-lcdfilter

	     rgba: rgb, bgr, v-rgb, v-bgr
	     lcdfilter: lcddefault, lcdlight, lcdlegacy, lcdnone

	     Lagm LCD test: http://www.lagom.nl/lcd-test/subpixel.php
	     More info here: http://duganchen.ca/writings/slackware/fonts
	-->
	<!--
	<match target="font">
		<edit name="rgba" mode="assign">
			<const>rgb</const>
		</edit>
		<edit name="lcdfilter" mode="assign">
			<const>lcddefault</const>
		</edit>
	</match>
	-->
</fontconfig>
