Skip to content

Instantly share code, notes, and snippets.

@mait
Created April 2, 2010 02:22
Show Gist options
  • Save mait/352660 to your computer and use it in GitHub Desktop.
Save mait/352660 to your computer and use it in GitHub Desktop.
fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
전체 글꼴에 적용되는 렌더링 옵션. 글꼴 개별적인 렌더링 설정보다 앞으로
와야 합니다.
- 영문 글꼴들은 대체적으록 autohint를 켜야 미려하고 깔끔하게 보입니다.
- hintfull은 가장자리가 살짝 거칠어 보인다. hintmedium 선택.
- 우분투의 경우 autohint off, hintmedium이 기본값
-->
<match target="font">
<edit name="autohint"><bool>true</bool></edit>
<edit name="hintstyle"><const>hintmedium</const></edit>
</match>
<!--
한글 글꼴은 autohint 적용하면 대부분 찌글찌글해 보인다. 그러나 lang=ko
속성을 이용해서 일괄적으로 한글 글끌의 autohint 속성을 끄는 방법은
다른 언어의 일부 글꼴에도 적용되는 부작용이 있어 각 글꼴별로 지정해서
꺼줍니다.
-->
<match target="font">
<test name="family">
<string>NanumGothicCoding</string>
<string>나눔고딕코딩</string>
<string>LexiSaebomR</string>
</test>
<edit name="autohint"><bool>false</bool></edit>
</match>
<!--
렉시새봄의 autohint를 끄면 굵은 글꼴일 경우 너무 번져 보인다.
별도의 굵은 글꼴이 없고 인위적으로 만들어낸 결과물이라 그런 듯.
렉시새봄 굵을 때 autohint on
-->
<match target="font">
<test name="family" ><string>LexiSaebomR</string></test>
<test name="weight" compare="more"><const>medium</const></test>
<edit name="autohint"><bool>true</bool></edit>
</match>
<!--
<match target="font">
<test name="family"><string>Lucida Bright</string></test>
<test name="weight" compare="more"><const>medium</const></test>
<edit name="hintstyle"><const>hintfull</const></edit>
</match>
-->
<!--
굵은 글꼴은 Lucida Bright 글꼴로 대체하기 위해 Lucida Std Bold 글
꼴을 제거
-->
<match target="pattern">
<test name="weight" compare="more"><const>medium</const></test>
<test name="family">
<string>serif</string>
<string>Lucida Std</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Lucida Bright</string>
</edit>
</match>
<!-- 여러 글꼴을 섞어 하나의 글꼴에 매칭 시키는 방법이다. 임의의
이름으로는 되지 않고 serif, sans-serif, monospace에만 동작
하는 것 같다. 한글 글꼴의 경우 대부분 영문 글자를 포함하고
있으므로 영문 글꼴의 위로 올려 우선순위를 높여야 원하는 영문
글꼴과 한글의 조합이 가능하다.
중국어나 일본어 글꼴도 지정할 경우 중국어 글꼴이 더 많은 한자를
포함하고 있기 때문에 한글 글꼴 보다는 우선순위가 높아야 할 것 같다.
일본어 글꼴도 마찬가지가 아닐까 싶은데 확실치 않다.
한중일 글꼴의 조합 순위에 관해서 다음 fontconfig 메일링 리스트중
다음 글타래를 참고해 보시기 바랍니다.
http://bugs.freedesktop.org/show_bug.cgi?id=20911
-->
<alias binding="same">
<family>serif</family>
<prefer>
<family>Lucida Std</family>
<family>Lucida Bright</family>
<family>LexiSaebomR</family>
</prefer>
</alias>
<alias binding="same">
<family>sans-serif</family>
<prefer>
<family>Lucida Sans</family>
<family>LexiSaebomR</family>
</prefer>
</alias>
<alias binding="same">
<family>monospace</family>
<prefer>
<family>Droid Sans Mono Slashed</family>
<family>Droid Sans Mono</family>
<family>NanumGothicCoding</family>
</prefer>
</alias>
</fontconfig>
@mait
Copy link
Author

mait commented Apr 9, 2010

으흠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment