[HOME] [github] [twitter] [blog] [fml4] [fml8] [北海道] Powered by NetBSD and [nuinui.net] .

パッケージ: ghostscript (postscript and PDF interpreter/viewer)

Important: チェックポイント

□ ターゲット     /usr/pkgsrc/print/ghostscript
            /usr/pkgsrc/fonts/ghostscript-fonts
            /usr/pkgsrc/fonts/ja-sazanami-ttf
□ /etc/rc.conf    なし
□ 設定ファイル    /usr/pkg/share/ghostscript/$(VERSION)/Resource/Init/cidfmap
□ ポート番号     なし
□ 動作の確認     gsで日本語ポストスクリプトファイルが表示できる。

Caution

サーバ機でプリンタや TeX を共有する場合にはサーバに ghostscript を入れる必要があります。 そういう意味合いで「サーバの構築」話に追加しました。

ghostscript は TeX の PDF 変換やプレビューで必須です。

注意: # や % の意味が分からない人は 用語 を参照してください。

インストール

print/ghostscript とフォントを入れて下さい。

% su root
# cd /usr/pkgsrc/print/ghostscript
# make install
# cd /usr/pkgsrc/fonts/ghostscript-fonts
# make install
# cd /usr/pkgsrc/fonts/ja-sazanami-ttf
# make install
print/gv (ghostview の後継)もインストールすると便利です。
# cd /usr/pkgsrc/print/gv
# make install

この例は日本語フォントとして TTF (True Type Font)を使う前提です。

Caution

2011/04 以降: make packege ではなく make install を使ってください。 事情の詳細は the Section called 2011 春: make install および make package の動作が変わる in the Chapter called NetBSD サーバの構築 節を参照してください。

設定

日本語フォントとして TTF (True Type Font)を使うためには、 ghostscript の cidfmap ファイルを編集する必要があります。 cidfmap ファイルのパスは

/usr/pkg/share/ghostscript/$(VERSION)/Resource/Init/cidfmap
です。 $(VERSION) は 8.70 など、インストールするバージョン依存です。

cidfmap ファイルに追加する中身は次のような感じにしてください。

/Ryumin-Light                 /Sazanami-Mincho-Regular ;
/GothicBBB-Medium             /Sazanami-Gothic-Regular ;
/MS-Mincho                    /Sazanami-Gothic-Regular ;

/Sazanami-Mincho-Regular      << /FileType /TrueType  /CSI [(Japan1) 6]  /Path (/usr/pkg/lib/X11/fonts/TTF/sazanami-mincho.ttf) >> ;
/Sazanami-Gothic-Regular      << /FileType /TrueType  /CSI [(Japan1) 6]  /Path (/usr/pkg/lib/X11/fonts/TTF/sazanami-gothic.ttf) >> ;

[HOME] [github] [twitter] [blog] [fml4] [fml8] [北海道] Powered by NetBSD and [nuinui.net] .
Copyright (C) 1993-2022 Ken'ichi Fukamachi mail:< fukachan at fml.org >