티스토리 뷰

[우분투 8.04] 글꼴 변경하기(맑은고딕)

 이번에도 우려먹기 글이다. ㅎㅎ 뭐~ 8.04로 오면서 약간 변경된 사항도 있긴 하다.

 우분투의 기본 글꼴은 sans-serif(이 글꼴이 실제로 존재하는 것은 아니고 지정된 글꼴을 링크하고 있는 형식이라고 생각하면 된다. 기본적으로는 은돋움에 연결되어 있다) 인데 처음 우분투를 접하는 사람에게는 뭔가 흐릿해 보이는 것이 가독성이 현저히 떨어진다. 그럴 경우 보통 윈도우 XP에서 쓰는 굴림 이나 윈도우 비스타에서 쓰는 맑은고딕 을 처음 우분투를 접하는 사람에게 권장하고 있다. 그외에도 괜찮은 글꼴이 많으니 이 포스트를 보고 다른 글꼴도 적용해 본 후 선택하기 바란다. 여기에서는 내가 현재 쓰고 있는 맑은고딕체 위주로 설명할 것이다.

1. 맑은고딕체는 알아서 구하기 바란다. 저작권이 걸려 있는 글꼴이라서...ㅡㅡ;

2. 만약 구해온 맑은고딕체가 rar로 압축되어 있다면 unrar 패키지를 설치해서 압축을 풀어 준다.
sudo apt-get install unrar
3. 압축을 푼 malgun.ttf 파일을 아래 폴더로 이동 또는 복사한다.
/usr/share/fonts/truetype
4. 폰트 정보를 갱신한다.
fc-cache -f -v
5. 시스템 > 기본 설정 > 모양새 > 글꼴 탭으로 이동해서 글꼴을 적용한다.


6. 자세히... 로 들어가서 각자 취향에 맞게 설정한다.


7. 이렇게 해도 글꼴이 깨져 보이는 경우가 있을 것이다. 이것은 한글 글꼴의 AutohintAntialias가 꺼져 있어서 그렇다. 이것을 켜주려면 터미널에서 아래 명령어를 입력한다.
sudo gedit /etc/fonts/conf.d/29-language-selector-ko-kr.conf
8. 나오는 텍스트 편집기에서 아래 붉은 색으로 되어 있는 false를 true로 바꿔주면 된다.
<!-- 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>
9. 이제 재부팅하고 나면 마음에 드는 글꼴을 확인할 수 있을 것이다. ^^


+ 위에서 우분투의 기본글꼴인 sans-serif은돋움에 연결되어 있다고 했다. 즉, 우분투의 기본글꼴은 은돋움이라고 할 수 있는데 이것을 다른 글꼴로 바꾸고 싶다면 아래 붉은 부분을 바꿔 주면 된다. serifmonospace 등도 이런 식으로 적용하면 된다.
sudo gedit /etc/fonts/conf.d/69-language-selector-ko-kr.conf

<!-- Set preferred Korean fonts -->
    <match target="pattern">
        <test qual="any" name="family">
            <string>serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>UnBatang</string>
        </edit>
    </match>
    <match target="pattern">
        <test qual="any" name="family">
            <string>sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>UnDotum</string>
            <string>Guseul</string>
        </edit>
    </match>
    <match target="pattern">
        <test qual="any" name="family">
            <string>monospace</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>UnDotum</string>
            <string>Guseul</string>
        </edit>
    </match>
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함