Automatically Install Microsoft YaHei on Ubuntu
Preface
Ubuntu released 11.10 earlier this month, and immediately I got it installed on my laptop. But I always feel bad about the default font, so I find out one automatical way to install Microsoft YaHei on Ubuntu. Sounds good, isn’t it? But if you feel so terrible about Microsoft that you don’t even want to touch anything from M$, you can just ignore this article.
Body
In fact this method is designed for Ubuntu 8.10 and 9.04, but according to my test, it works well on 11.10, so just go ahead.
Install:
wget -O get-fonts.sh.zip http://files.cnblogs.com/DengYangjun/get-fonts.sh.zip unzip -o get-fonts.sh.zip 1>/dev/null chmod a+x get-fonts.sh ./get-fonts.sh
Remove the install shell and downloaded fonts:
rm get-fonts.sh get-fonts.sh.zip 2>/dev/null
Restore default font settings:
cd /etc/fonts/conf.avail sudo mv 51-local.conf.old 51-local.conf 2>/dev/null sudo mv 69-language-selector-zh-cn.conf.old 69-language-selector-zh-cn.conf 2>/dev/null sudo rm -f -r /usr/share/fonts/truetype/myfonts 2>/dev/null
Please notice that I’m using zh-cn locale, so I’m not sure which file you should change if you’re using en as locale. And I think YaHei works well for Chinese and Japanese, but I’m not sure for other languages, please try it yourself:)
Cited from Ubuntu Home, and the link of the article is here.
works like a charm!
Thanks!