Windows のトゥルータイプフォントを使う

http://www.redout.net/diary/2001/0502.html
"C:\Windows\Fonts\" フォルダーの "msgothic.ttc" を/usr/X11R6/lib/X11/fonts/TrueType/ にコピー。
そのディレクトリの fonts.dir に以下を追加。さらにファイル先頭に書いてある数を+12する。

fn=1:msgothic.ttc -ms-pgothic-medium-r-normal--0-0-0-0-p-0-iso8859-1
ab=y:fn=1:msgothic.ttc -ms-pgothic-bold-r-normal--0-0-0-0-p-0-iso8859-1
fn=1:ai=0.4:msgothic.ttc -ms-pgothic-medium-i-normal--0-0-0-0-p-0-iso8859-1
ab=y:fn=1:ai=0.4:msgothic.ttc -ms-pgothic-bold-i-normal--0-0-0-0-p-0-iso8859-1
fn=1:msgothic.ttc -ms-pgothic-medium-r-normal--0-0-0-0-p-0-jisx0201.1976-0
ab=y:fn=1:msgothic.ttc -ms-pgothic-bold-r-normal--0-0-0-0-p-0-jisx0201.1976-0
fn=1:ai=0.4:msgothic.ttc -ms-pgothic-medium-i-normal--0-0-0-0-p-0-jisx0201.1976-0
ab=y:fn=1:ai=0.4:msgothic.ttc -ms-pgothic-bold-i-normal--0-0-0-0-p-0-jisx0201.1976-0
fn=1:msgothic.ttc -ms-pgothic-medium-r-normal--0-0-0-0-p-0-jisx0208.1983-0
ab=y:fn=1:msgothic.ttc -ms-pgothic-bold-r-normal--0-0-0-0-p-0-jisx0208.1983-0
fn=1:ai=0.4:msgothic.ttc -ms-pgothic-medium-i-normal--0-0-0-0-p-0-jisx0208.1983-0
ab=y:fn=1:ai=0.4:msgothic.ttc -ms-pgothic-bold-i-normal--0-0-0-0-p-0-jisx0208.1983-0

これで Mozilla で mspgothic が使えるようになる。


※ xft2 が使われている場合は次も実行。

fc-cache -f -v /usr/X11R6/lib/X11/fonts/TrueType/ 
fc-list

で確認できる。


[追記:2007-10-26]
fonts.dir は以下のようにして作成できる。

# esemkfontdir  -ai -sp p -v ms -n gothic -o fonts.dir -f msgothic.ttc
# esemkfontdir  -ai -sp c -v ms -n gothic -o fonts.dir -f msgothic.ttc

http://enoki.blog4.fc2.com/blog-date-200512.html
http://web.archive.org/web/*/http://sickhack.homelinux.org/linux/XdeTT/esemkfontdir.pl.txt


ttmkfdir を使う方法
http://park15.wakwak.com/~unixlife/linux/x-fontdir.html