네이버에서 한글날을 맞아 배포한 나눔고딕, 나눔명조를 Ubuntu 환경에서 사용해보려고 설치했는데, 안티알리아싱이 안 먹는지, 이쁘게 나오지 않아서 이리저리 설정을 뒤지다가 설정방법을 찾았다.
사용환경은 현재 사용하고 있는 버전 8.10이라 8.10에서 밖에 확인하지 못 했다. 다른 버전에서도 마찬가지일꺼라 예상한다.
Ubuntu 8.10에는 fontconfig 2.6.0이 설치되어 있는데 기본적으로 한국어는 10부터 22 pixel 까지에서는 antialias가 꺼지도록 되어있다. 이 부분만 수정하면 OK! 한글환경에서는 구버전 굴림글꼴때문에 antialias가 꺼지도록 되어있는가보다.
/etc/fonts/conf.d/29-language-selector-ko-kr.conf 파일을 보면, 아래와 같이 10 ~ 22 pixel에서 대해서는 antialias, autohint를 끄도록 설정되어 있다.
<!-- Turn off antialias and autohint for Korean fonts depending on pixelsize -->
<match target="font">
<test name="lang" compare="contains">
<string>ko</string>
</test>
<test name="pixelsize" compare="more">
<int>10</int>
</test>
<test name="pixelsize" compare="less">
<int>22</int>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
<edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintmedium</const>
</edit>
</match> |
위의 파일은 시스템 파일이므로 추후 업데이트 시 수정될 수도 있어서 홈디렉터리에 .fonts.conf을 만들 설정하는 것으로 해결했다.
자신의 홈디렉터리에 .fonts.conf 파일을 만들고 아래 내용을 입력한 후 저장한다. (antialias, autohint 부분 수정)
<match target="font">
<test name="lang" compare="contains">
<string>ko</string>
</test>
<test name="pixelsize" compare="more">
<int>10</int>
</test>
<test name="pixelsize" compare="less">
<int>22</int>
</test>
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintmedium</const>
</edit>
</match> |
위와 같이 파일을 만든 후 로그아웃하거나, 재부팅하면 뭉그러지지 않은 나눔글꼴을 볼 수 있다.
P.S. sudo로 루트권한으로 실행되는 어플리케이션의 경우는 root 계정의 설정을 따르기 때문에 /root 디렉터리에 .fonts.conf를 만들어주면 해결된다.