ps 印刷時(ghostscript)のフォント設定

/etc/ghostscript 下の
cidfmap.ja <-
FAPIcidfmap.ja

デフォルトではこんなんなってる.


/Sazanami-Gothic << /FileType /TrueType /Path (/usr/share/fonts/japanese/TrueType/sazanami-mincho.ttf) /CSI [(Japan1) 6] >> ;
/Sazanami-Gothic-Regular /Sazanami-Gothic ;
/Sazanami-Gothic-JaH << /FileType /TrueType /Path (/usr/share/fonts/japanese/TrueType/sazanami-gothic.ttf) /CSI [(Japan2) 0] >> ;
/Sazanami-Gothic-Regular-JaH /Sazanami-Gothic-JaH ;
/Sazanami-Mincho << /FileType /TrueType /Path (/usr/share/fonts/japanese/TrueType/sazanami-mincho.ttf) /CSI [(Japan1) 6] >> ;
/Sazanami-Mincho-Regular /Sazanami-Mincho ;
/Sazanami-Mincho-JaH << /FileType /TrueType /Path (/usr/share/fonts/japanese/TrueType/sazanam-gothic.ttf) /CSI [(Japan2) 0] >> ;
/Sazanami-Mincho-Regular-JaH /Sazanami-Mincho-JaH ;
/Ryumin-Light /Sazanami-Mincho ;
/GothicBBB-Medium /Sazanami-Gothic ;
/Adobe-Japan1 /Sazanami-Gothic ;
/Adobe-Japan2 /Sazanami-Gothic-JaH ;
を変える.

フォントパスの通っているディレクトリを見る


# gs -h
Search path:
. : /usr/share/ghostscript/8.15/lib :
/usr/share/ghostscript/8.15/Resource : /usr/share/ghostscript/fonts :
/usr/share/fonts/default/ghostscript : /usr/share/fonts/default/Type1 :
/usr/share/fonts/default/amspsfnt/pfb :
/usr/share/fonts/default/cmpsfont/pfb : /etc/ghostscript

/usr/share/ghostscript/fonts にフォントを追加することにする.
ディレクトリが無ければ作成.
# mkdir /usr/share/ghostscript/fonts
ここに .ttf をコピーしておく
例 ipam.ttf, ipag.ttf

/etc/ghostscript/cidfmap.ja の中身を以下のようにする.
注意:編集前のコピーをとっておくこと.
# cd /etc/ghostscript
# cp cidfmap.ja cidfmap.ja.org

ファイルの中身


/IPAGothic << /FileType /TrueType /Path (ipag.ttf) /CSI [(Japan1) 6] >> ;
/IPAMincho << /FileType /TrueType /Path (ipam.ttf) /CSI [(Japan1) 6] >> ;
%
/IPAGothic-Regular /IPAGothic ;
/IPAMincho-Regular /IPAMincho ;
/Ryumin-Light /IPAMincho ;
/GothicBBB-Medium /IPAGothic ;
/HeiseiMin-W3 /Ryumin-Light ;
/HeiseiKakuGo-W5 /GothicBBB-Medium ;
/Adobe-Japan1 /Ryumin-Light ;
/Adobe-Japan2 /Ryumin-Light ;
これでおk.

Sazanami フォントで印刷したいなら,


/Sazanami-Mincho << /FileType /TrueType /Path (/usr/share/fonts/japanese/TrueType/sazanami-mincho.ttf) /CSI [(Japan1) 6] >> ;
/Sazanami-Gothic << /FileType /TrueType /Path (/usr/share/fonts/japanese/TrueType/sazanami-mincho.ttf) /CSI [(Japan1) 6] >> ;
を書いて

/Ryumin-Light /Sazanami-Mincho ;
/GothicBBB-Medium /Sazanami-Gothic ;
と書き直す.