일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- psychology
- Malaysia
- ubuntu
- management
- Java
- comic agile
- Book review
- QT
- Python
- essay
- programming_book
- Book
- Kuala Lumpur
- Software Engineering
- agile
- hbase
- MySQL
- hadoop
- RFID
- leadership
- Italy
- django
- web
- erlang
- history
- program
- Linux
- Spain
- Programming
- France
- Today
- Total
네이버 사전체 + Lucida Sans Typewriter fonts on Ubuntu 본문
1. 글꼴 설치하기
1.1 네이버사전체 설치
- 네이버 사전체를 내려받습니다.
$ wget http://cndic.naver.com/font.nhn?menu=downloadt
위 명령어가 제대로 되지 않는 경우 다음 페이지에서 직접 받습니다.
http://cndic.naver.com/font.nhn
- 네이버 사전체 추가
$ tar xvfz naverdic.tgz
$ sudo mkdir /usr/share/fonts/truetype/naver
$ sudo mv naverdic.ttf /usr/share/fonts/truetype/naver
$ sudo fc-cache -v
1.2 Lucida 글꼴 설치
- Lucida 글꼴은 고정폭 글꼴을 포함하고 있습니다. 이 글꼴은 안티앨리어스를 껐을 때, 깔끔하게 보입니다. 이 글꼴은 자바 패키지에 포함되어 있습니다.
$ sudo apt-get install sun-java6-fonts
2. 글꼴 설정하기
2.1 글꼴 설정 설명
- $ man fonts.conf로 설명을 읽어보면, 핵심 폰트 설정 파일은/etc/fonts/fonts.conf입니다.
/etc/fonts/fonts.conf를 읽고 /etc/fonts/conf.d를읽고 /etc/fonts/local.conf,
~/.fonts.conf를 읽는 구조로 되어있는 것 같습니다.
- /etc/fonts/fonts.conf는 패키지 업데이트
시에 대체되므로 이곳을 건드리는 것은 적절치 못합니다. 따라서시스템 전역에 설정이 적용되게 하려면
/etc/fonts/local.conf를, 사용자 영역에 국한되게 하려면~/.fonts.conf를 작성하면 됩니다.
2.2 사용자 글꼴 설정
- /etc/fonts/local.conf나 ~/.fonts.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>
2.3 사용자 설정 적용
- 위에서 설정한 사항을 적용하기 위하여 X를 재시작합니다. 이게 뭔 말인지 모르시면 재부팅합니다.