Skip to main content

[우분투 8.10] 한글 폰트 안티 앨리어싱(AA)적용

jsp공부를 위해서 구석에 놀고 있는 컴퓨터에 우분투 설치후 서버를 구축하는 과정에서 구글링을 통해서 알아낸 블로그에서 똑같이 복사한 것이다..

원문 >> 꿈의초코


우분투에서 처음 한글 언어를 설정하고 한글을 사용하면 아무 문제가 없지만 글꼴을 바꾼다던지 하게 되면 한글이 예쁘게 보이지 않고 글자가 깨져서 나오게 될 때가 있다.
이 문제는 한글 폰트에 안티 앨리어싱이 적용되지 않아서 발생하는 문제이다.
이것을 적용하기 위해서는 다음과 같은 과정이 필요하다.
먼저 다음 명령어를 입력하자

$sudo gedit /etc/fonts/conf.avail/29-language-selector-ko-kr.conf

예전의 경로와 다르다고 하는데 예전에 사용해보지 않아서 잘 모르겠다.
위 명령어를 입력하면 폰트 환경을 설정할 수 있는 파일이 있는데 확장자가 conf파일이지만 내 생각에는 xml문서같다.(주석처리 부분도 그렇구.ㅋㅋ)
파일을 해석해보진 않았지만 주석처리 부분을 보지 않으면 잘 모를 것 같다.
주석 처리 부분에 보면 다음과 같은 글이 써있는 부분이 있다.
아마도 54라인부터 있을 것이다.

<!– 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>

이렇게 되어 있는 부분을

<!– 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>
–>

이렇게 <!– –>이걸로 주석처리 해준다.
그리고 아래 부분에 보면 또 다음과 같은 부분이 있을 것이다.

<!– Turn off antialias and autohint for ttf-alee depending on pixelsize –>
<match target=”font”>
<test name=”family”>
<string>Guseul</string>
</test>
<edit name=”autohint” mode=”assign”>
<bool>true</bool>
</edit>
</match>
<match target=”font”>
<test name=”family”>
<string>Guseul</string>
<string>Guseul Mono</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>
</match>

이 부분도 다음과 같이 <!– –>로 주석처리 해주자.

<!– Turn off antialias and autohint for ttf-alee depending on pixelsize –>
<!–
<match target=”font”>
<test name=”family”>
<string>Guseul</string>
</test>
<edit name=”autohint” mode=”assign”>
<bool>true</bool>
</edit>
</match>
<match target=”font”>
<test name=”family”>
<string>Guseul</string>
<string>Guseul Mono</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>
</match>
–>

이렇게 해주면 설정이 안티 앨리어싱이 적용된다. 그런데 재부팅해야하는지는 잘 모르겠다.

댓글 남기기