페도라를 쓰던 우분투를 쓰던 항상 골칫거리는 폰트다! 본인은 눈이 너무나 아름답고 예민한 관계로 뿌옇게 보이는 폰트를 보고 있노라면 정신이 오락가락하면서 죄없는 안경만 연신 닦게 된다. MobileSim 새 버전이 윈도우에서 메롱거리는 바람에 VirtualBox로 우분투를 깔고 이것저것 찾아보던 중 정말 효과 만점의 폰트 교체 방법을 찾을 수 있었다.
가장 많이 검색되는 폰트 교체 방법은 맑은 고딕체로 변경하는 것이다. 그러나 맑은 고딕 폰트가 MS에 물려있는데다가 변경한 후의 모습이 윈도우와 다르게 여전히 뿌옇기 때문에 탈락! 그런고로 다음의 방법을 사용하자. 아래의 방법은 http://kldp.org/node/92122 을 참고하여 다시 정리하였다.
1. 글꼴 설치
우리가 받아야 할 폰트는 네이버 사전체와 Lucida이다. 네이버 사전체는 http://cndic.naver.com/font.nhn 에서 받을 수 있다. 웹 페이지를 들어가면 중국어 사전이 뜨는데 그 아래에 보면 사전체 다운로드 링크가 보일 것이다. Lucida 폰트는 apt-get을 통해 설치가 가능하다.
tar xvfz naverdic.tgz
sudo mkdir /usr/share/fonts/truetype/naver
sudo mv naverdic.ttf /usr/share/fonts/truetype/naver
sudo fc-cache -v
sudo apt-get install sun-java6-fonts
2. 글꼴 설정하기
원문에서는 /etc/fonts/local.conf를 수정하라고 했는데, 우분투 9.04는 폰트 컨피규레이션이 세세히 나뉘어져 있어서 저 파일 대신 /etc/fonts/conf.d/69-language-selector-ko-kr.conf 를 수정했더니 잘 동작한다. 다음과 같이 수정하자.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- 'sans' 글꼴을 'sans-serif' 글꼴로 대체합니다. -->
<!-- Accept 'sans' alias, replacing it with '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>
<!-- Set preferred Korean fonts -->
<match target="pattern">
<!--
'serif' 글꼴을 'UnBatang' 글꼴로 대체합니다. 언젠가부터
글꼴의 영문 이름이 먹질 않습니다. 그래서 '은바탕'을 추가합니다.
-->
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>UnBatang</string>
<string>은바탕</string>
</edit>
</match>
<match target="pattern">
<!-- 'sans-serif' 글꼴을 '네이버사전'으로 대체합니다. -->
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>naverdic</string>
<string>네이버사전</string>
</edit>
</match>
<!-- Set prefferd fixed space font -->
<match target="pattern">
<!--
'Monospace' 글꼴을 'Lucida Sans Typewriter'나 'Andale Mono'
글꼴로 대체합니다.
안티앨리어스 해제 시, 'Lucida Sans Typewriter'가
'Andale Mono'보다 예뻐 보입니다.
-->
<test qual="any" name="family">
<string>Monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Lucida Sans Typewriter</string>
<string>Andale Mono</string>
</edit>
</match>
<!--
고정폭 영문 글꼴을 네이버사전체와 연결합니다. 이렇게 하면,
영문은 'Lucida Sans Typewriter' 글꼴로,
한글은 '네이버사전' 글꼴로 보입니다.
-->
<!-- Bind fixed space font with 네이버사전 -->
<match target="pattern">
<test name="family">
<string>Lucida Sans Typewriter</string>
</test>
<edit mode="append" binding="strong" name="family">
<string>naverdic</string>
<string>네이버사전</string>
</edit>
</match>
<!--
은글꼴과 alee 글꼴에 대하여 안티앨리어스와 오토힌팅을 켭니다.
원래는 이곳에 필요가 없었으나, 한글 글꼴의 영문 이름이 인식되지
않게 되면서 아래와 같이 해 줘야 합니다.
-->
<!-- Turn on antialias and hinting with hintmedium for ttf-Unfonts -->
<match target="font">
<test name="family" compare="contains">
<string>은</string>
<string>방울</string>
<string>반달</string>
<string>Un</string>
</test>
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<edit name="hintsytle" mode="assign">
<const>hintmedium</const>
</edit>
</match>
<!--
위에서 설정한 고정폭 영문 글꼴에 대하여 8~11 포인트에서는
안티앨리어스와 오토힌트를 끕니다.
-->
<!-- Turn off antialias and autohint for some Mono fonts -->
<match target="font">
<test name="family" compare="contains">
<string>Andale Mono</string>
<string>Lucida Sans Typewriter</string>
</test>
<test name="pixelsize" compare="more">
<int>11</int>
</test>
<test name="pixelsize" compare="less">
<int>16</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>
</fontconfig>
3. 리부팅따윈 필요없다
설정을 마치면 몇초내에 글꼴이 자동으로 변경된다. 보라 이 깔끔한 폰트를!! 뿌옇게 비실거리던 한글 폰트는 이제 안녕- 터미널에서 출렁거리던 영문 폰트도 이제 안녕-
http://semix2.textcube.com/399
'Linux > Tip' 카테고리의 다른 글
Linux + Apache2 + Mysql + PHP/Perl/Python 환경을 설치 (0) | 2012.10.01 |
---|---|
linux 글꼴 설정 내용 (0) | 2012.10.01 |
ubuntu : ko_KR.UTF-8을 ko_KR.EUC-KR로 바꾸는 방법 (0) | 2012.10.01 |
Ubuntu MySQL utf-8 설정 (0) | 2012.10.01 |
Using Intel Compilers for Linux with Ubuntu (0) | 2012.10.01 |