<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
	<!--	
	<include ignore_missing="yes">/var/lib/defoma/fontconfig.d/fonts.conf</include>
	-->
	<!-- Uncomment below to enable bitmapped fonts -->

<dir>/usr/X11R6/lib/X11/fonts</dir>

<!-- Uncomment below to enable subpixel rendering --><!--
<match target="font">
	<test qual="all" name="rgba">
		<const>unknown</const>
	</test>
	<edit name="rgba" mode="assign"><const>rgb</const></edit>
</match>
-->

<!--
설정 시작
-->

<!-- 글꼴 설정 기본값 -->
<match target="font">
	<edit mode="assign" name="autohint"><bool>true</bool></edit>
	<edit mode="assign" name="antialias"><bool>true</bool></edit>
</match>

<!-- mono 를 monospace 로... -->
<match target="pattern"><test qual="any" name="family"><string>mono</string></test>
<edit name="family" mode="assign"><string>monospace</string></edit></match>
<!-- sans serif 를 sans-serif 로...-->
<match target="pattern"><test qual="any" name="family"><string>sans serif</string></test>
<edit name="family" mode="assign"><string>sans-serif</string></edit></match>
<!-- sans 를 sans-serif 로... -->
<match target="pattern"><test qual="any" name="family"><string>sans</string></test>
<edit name="family" mode="assign"><string>sans-serif</string></edit></match>

<!-- 볼드가 없는 글꼴들을 위한 인공 볼드 설정 (libxft2 패치 필요) -->
<match target="font">
	<test name="family">
		<string>Gulim</string>
		<string>GulimChe</string>
		<string>Simsun</string>
	</test>
	<test compare="less_eq" name="weight"><const>medium</const></test>
	<test compare="more" target="pattern" name="weight"><const>medium</const></test>
	<edit mode="assign" name="weight"><const>bold</const></edit>
</match>

<!-- 윈도우의 굴꼴들에 대해서, 글꼴 크기에 따라 AA 를 적절하게 설정하는 부분 -->
<match target="font">
	<test name="family">
		<string>Gulim</string>
		<string>GulimChe</string>
		<string>Batang</string>
		<string>BatangChe</string>
		<string>Simsun</string>
	</test>
	<test compare="less" name="pixelsize"><double>21.0</double></test>
	<test compare="more" name="pixelsize"><double>11.0</double></test>
	<edit mode="assign" name="antialias"><bool>false</bool></edit>
	<edit mode="assign" name="spacing"><int>0</int></edit>
	<edit mode="assign" name="hinting"><bool>false</bool></edit>
</match>
<match target="font">
	<test name="family">
		<string>Gulim</string>
		<string>GulimChe</string>
		<string>Batang</string>
		<string>BatangChe</string>
		<string>Simsun</string>
	</test>
	<test mode="eq" name="slant" qual="any"><const>oblique</const></test>
	<edit mode="assign" name="antialias"><bool>true</bool></edit>
	<edit mode="assign" name="hinting"><bool>true</bool></edit>
</match>
<match target="font">
	<test name="family">
		<string>Gulim</string>
		<string>GulimChe</string>
		<string>Batang</string>
		<string>BatangChe</string>
		<string>Simsun</string>
	</test>
	<test mode="eq" name="slant" qual="any"><const>italic</const></test>
	<edit mode="assign" name="antialias"><bool>true</bool></edit>
	<edit mode="assign" name="hinting"><bool>true</bool></edit>
</match>
<match target="font">
	<test name="family">
		<string>Gulim</string>
		<string>GulimChe</string>
		<string>Batang</string>
		<string>BatangChe</string>
		<string>Simsun</string>
	</test>
	<test mode="eq" name="slant" qual="any"><const>roman</const></test>
	<edit mode="assign" name="antialias"><bool>true</bool></edit>
	<edit mode="assign" name="hinting"><bool>true</bool></edit>
</match>

<!-- 한글 고정폭 글꼴이 벌어지는 버그 패치 -->
<!-- from http://gnome.or.kr/wiki/FontConfig
이게 무엇인고 하면, 한글 고정폭 글꼴은 알파벳 등도 포함하는데, 사실 이러면
고정폭이 아니다. 알파벳이 한글 너비의 반 밖에 안되니까 글꼴 전체로 봐서는
가변폭인 셈이다. 따라서 특정 언어권이나 글꼴 이름에 대해서는 고정폭이란 정보를
무시하고 직접 너비를 정해서 써야 된다고 한다. -->
<match target="font">
	<test name="family">
		<string>GulimChe</string>
		<string>DotumChe</string>
		<string>BatangChe</string>
		<string>GungsuhChe</string>
		<string>UnBatang</string>
		<string>Eunjin</string>
	</test>
	<edit name="globaladvance"><bool>false</bool></edit>
	<edit name="spacing"><int>0</int></edit>
</match>

<!-- 글꼴 별명 -->
<!-- Serif 글꼴 -->
<alias>
	<family>Batang</family>
	<default><family>serif</family></default>
</alias>
<!-- Sans-serif 글꼴 -->
<alias>
	<family>Gulim</family>
	<default><family>sans-serif</family></default>
</alias>
<!-- Monospace 글꼴 -->
<alias>
	<family>GulimChe</family>
	<default><family>monospace</family></default>
</alias>
<!-- 표준 이름들을 위해 필요한 별명 제공 -->
<alias>
	<family>serif</family>
	<prefer><family>Batang</family></prefer>
</alias>
<alias>
	<family>sans-serif</family>
	<prefer><family>Gulim</family></prefer>
</alias>
<alias>
	<family>monospace</family>
	<prefer><family>GulimChe</family></prefer>
</alias>

<!--
<match target="pattern">
	<test name="family">
		<string>aquafont</string>
	</test>
	<edit name="family" mode="append" binding="strong">
		<string>Eunjin</string>
	</edit>
</match>
<match target="pattern">
	<test name="family">
		<string>BaroslFont</string>
	</test>
	<edit name="family" mode="append" binding="strong">
		<string>Eunjin</string>
	</edit>
</match>
-->

<!-- rgb sub-pixel ordering 관련 설정 -->
<!-- 가짜볼드가 푸르딩딩하게 나오는 것을 막기 위해 -->
<match target="font">
	<edit name="rgba" mode="assign"><const>none</const></edit>
</match>

<!-- 비트맵 글꼴 허용 -->
<!--
<selectfont><acceptfont><pattern>
	<patelt name="scalable"><bool>false</bool></patelt>
</pattern></acceptfont></selectfont>
-->


<!--
설정 끝
-->

<dir>~/.fonts</dir>
</fontconfig>
