套用 Droid 字型到 gentoo linux

因為這個字型真的很漂亮, 試了好幾天終於弄的差不多了

本來是直接安裝 droid 字型, 但後來發現文泉驛微米黑有後續新增部份 CJK 字元

但是因為 droid 字型本身還有 Serif 的部份是 WQY 沒有的

所以還是修正了一下讓他們共存, 內容參考自 Droid字型 與 設定檔

1. Install the font
# emerge media-fonts/droid
# emerge media-fonts/wqy-microhei

2. Change your setting part 1

# cd /etc/fonts/conf.avail
# vim 41-ttf-droid.conf

<?xml version=”1.0″?>
<!DOCTYPE fontconfig SYSTEM “fonts.dtd”>
<fontconfig>

<!–
Serif faces
–>
<alias>
<family>serif</family>
<prefer>
<family>Droid Serif</family>
<family>WenQuanYi Micro Hei</family>
<family>Droid Sans Fallback</family>
<family>Droid Sans Japanese</family>
</prefer>
</alias>
<!–
Sans-serif faces
–>
<alias>
<family>sans-serif</family>
<prefer>
<family>Droid Sans</family>
<family>WenQuanYi Micro Hei</family>
<family>Droid Sans Fallback</family>
<family>Droid Sans Japanese</family>
</prefer>
</alias>
<!–
Monospace faces
–>
<alias>
<family>monospace</family>
<prefer>
<family>Droid Sans Mono</family>
<family>WenQuanYi Micro Hei Mono</family>
<family>Droid Sans Fallback</family>
<family>Droid Sans Japanese</family>
</prefer>
</alias>

</fontconfig>

2. Change your setting part 2

# vim 61-ttf-droid.conf

<?xml version=”1.0″?>
<!DOCTYPE fontconfig SYSTEM “fonts.dtd”>
<fontconfig>

<!–
Serif faces
–>
<alias>
<family>serif</family>
<prefer>
<family>Droid Serif</family>
<family>WenQuanYi Micro Hei</family>
<family>Droid Sans Fallback</family>
<family>Droid Sans Japanese</family>
</prefer>
</alias>
<!–
Sans-serif faces
–>
<alias>
<family>sans-serif</family>
<prefer>
<family>Droid Sans</family>
<family>WenQuanYi Micro Hei</family>
<family>Droid Sans Fallback</family>
<family>Droid Sans Japanese</family>
</prefer>
</alias>
<!–
Monospace faces
–>
<alias>
<family>monospace</family>
<prefer>
<family>Droid Sans Mono</family>
<family>WenQuanYi Micro Hei Mono</family>
<family>Droid Sans Fallback</family>
<family>Droid Sans Japanese</family>
</prefer>
</alias>
</fontconfig>

3. Apply the setting

# eselect fontconfig enable {the setting number for the 2 files}
# eselect fontconfig disable {the setting number for 60-latin}

4. Others

a. Be sure you didn’t set any LC setting, the default setting must be en_US.UTF8.
b. And after relogin, you can specify the font size you want in gnome’s Apperence manager.
c. You can also enable the 10-autohint.conf and/or the 10-sub-pixel-rgb.conf to imporve the display effect.

Leave a Reply

Your email address will not be published. Required fields are marked *