フォントのインストール

友人がWindowsメイリオ化したとか言ってた。
それを聞いてなんとなく俺はLinuxのフォントを変えてみようと思った。


http://mix-mplus-ipa.sourceforge.jp/
で配布してるフォントの可読性が高かったのでこれを採用。
FC6だと/usr/share/fonts/japanese/
以下にフォントがあるようだから

$ mkdir /usr/share/fonts/japanese/TrueType/IPA_and_Mplus

でとりあえず新しいフォント用のディレクトリを作成
先のURLでダウンロードしたmixfont-mplus-ipa-TrueType-20060520.tar.bz2を

$ tar jxvf mixfont-mplus-ipa-TrueType-20060520.tar.bz2

で伸長。mixfont-mplus-ipa-TrueType-20060520が作成される。
ここからが正しいのか分からないんだけど、とりあえず使えるようにはなったのでメモ。


まずopfc-ModuleHP-1.1.1_withIPAFonts_and_Mplusディレクトリ内で

$ ./configure
(略)

ところがmakeファイルが作成されない。さすがに自分じゃ作れない。
Makefile.amとMakefile.inはMakefile作るときのひな型だよね?

  • fオプションで強制的に読み込むのは何が起きるか分からなくて恐いのでWindowsと同じように直接置く方法を調べた。
$ find . -name *.ttf
./fonts/ipagp.ttf
./fonts/M+1P+IPAG-circle.ttf
./fonts/ipam.ttf
./fonts/M+2VM+IPAG-circle.ttf
./fonts/M+2P+IPAG-circle.ttf
./fonts/M+1P+IPAG.ttf
./fonts/ipagui.ttf
./fonts/M+2P+IPAG.ttf
./fonts/ipag.ttf
./fonts/M+1VM+IPAG-circle.ttf
./fonts/ipamp.ttf

でTrueTypeFontを探し、全てのttfファイルを

# cp fonts/*.ttf /usr/share/fonts/japanese/TrueType/IPA_and_Mplus/

としてさきほど作ったディレクトリにコピー。
その後、

# vi /etc/X11/fs/config

XFS(X Font Server)の設定ファイルでディレクトリを追加

catalogue = /usr/share/X11/fonts/misc:unscaled,
        /usr/share/X11/fonts/75dpi:unscaled,
(略)
        /usr/share/fonts/japanese/TrueType,          ←カンマ追加
        /usr/share/fonts/japanese/TrueType/IPAfontsandMplus  ←追加

そして、XFSを再起動。

# /etc/rc.d/init.d/xfs restart
xfs を再起動中:
xfs を停止中:                                              [  OK  ]
xfs を起動中:                                              [  OK  ]

この後、Xサーバを再起動。

# xlsfonts | grep mplus
-mplus-fxd-bold-i-normal--0-0-75-75-c-0-iso8859-1
-mplus-fxd-bold-i-normal--0-0-75-75-c-0-iso8859-15
(以下略)

で確認できるのが今回いれたフォントってことでいいのかな?
でも
メインメニュー -> システム -> 設定 ー> フォント
で確認した方が分かりやすいかな。


参照リンク
http://www8.plala.or.jp/kusutaku/yusuket/f_inst.html
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/321usettxfs.html
http://www.geocities.jp/code_air_edge/HP/font.html