diary/Kojima/2007-10-26
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[diary/Kojima]]
・ghostscript-8.60
CUPSが使っている ESP Ghostscript をマージしたバージョンが...
のでビルド.ビルド自体は問題なかったんだけど,日本語のフ...
わりで結構ハマったので備忘録.
基本的には,
[[Ghostscript 8.60 を CentOS4.0 にインストール:http://d.h...
[[ghostscript 8.54 をインストール:http://centos.it-cafe.j...
それらを整理した手順.
- configure 時に --disable-compile-inits を指定
これを指定しないと,コンパイル時に初期化情報が埋め込まれ...
gs_res.ps の修正とかも読まれないらしい.
- lib/gs_res.ps の修正
gs_res.ps で /FontResoueceDir を指定している部分に日本語...
を置くディレクトリを指定
*** ./ghostscript-8.60/lib/gs_res.ps 2007-02-21 08:54:19...
--- ./gs_res.ps 2007-10-25 22:51:08.000000000 +0900
***************
*** 317,326 ****
} if
pssystemparams begin
.default_resource_dir
! /FontResourceDir (Font) .resource_dir_name
! readonly .forcedef % pssys'params is r-o
! /GenericResourceDir () .resource_dir_name
! readonly .forcedef % pssys'params is r-o
pop % .default_resource_dir
/GenericResourcePathSep
.file_name_separator readonly .forcedef % pssys'pa...
--- 317,326 ----
} if
pssystemparams begin
.default_resource_dir
! /FontResourceDir (/usr/share/ghostscript/8.60/Resour...
! readonly .forcedef % pssys'params is r-o
! /GenericResourceDir (/usr/share/ghostscript/8.60/Res...
! readonly .forcedef % pssys'params is r-o
pop % .default_resource_dir
/GenericResourcePathSep
.file_name_separator readonly .forcedef % pssys'pa...
- lib/cidfmap に日本語のフォントの情報を追加
/Ryumin-Light << /FileType /TrueType /Path (ipam....
/GothicBBB-Medium << /FileType /TrueType /Path (ipag....
/Ryumin-Medium /Ryumin-Light;
/HeiseiMin-W3 /Ryumin-Light;
/HeiseiKakuGo-W5 /GothicBBB-Medium;
/Kochi-Mincho /Ryumin-Light;
/Kochi-Gothic /GothicBBB-Medium;
/Adobe-Japan1 /Ryumin-Light;
/Adobe-Japan2 /Ryumin-Light;
/FutoMinA101-Bold /Ryumin-Light ;
/FutoGoB101-Bold /GothicBBB-Medium ;
/GothicMB101-hea /GothicBBB-Medium ;
/ShinGo-Bold /GothicBBB-Medium ;
ここで,ipa{m,g}.ttf はフルパスではなくフォント名だけで指...
/usr/share/ghostscript/fonts にリンクを作成する必要あり.
# フルパスだと CUPS 等に送った時とかにエラーになる模様
- gs_res.ps に指定した
FontResouceDir(/usr/share/ghostscript/8.60/Resource/CIDFo...
Spec ファイルを用意
drwxr-xr-x kojima/users 0 CIDFont/
-rw-r--r-- kojima/users 298 CIDFont/GothicBBB-Me...
-rw-r--r-- kojima/users 298 CIDFont/GothicBBB-Me...
-rw-r--r-- kojima/users 282 CIDFont/Ryumin-Light...
-rw-r--r-- kojima/users 282 CIDFont/Ryumin-Light...
このファイルの中身は
%! Font Specification
%%Title: GothicBBB-Medium-EUC-H
%%CreationDate: 06/xx/xx
%%ModificationDate: 06/xx/xx
%%EndComments
%%BeginResource: font GothicBBB-Medium-EUC-H
(GothicBBB-Medium-EUC-H)
(EUC-H) /CMap findresource
[(GothicBBB-Medium) /CIDFont findresource]
composefont pop
%%EndResource
%%EOF
こんな感じで,EUC-H のコーディングと GothicBBB-Medium と...
指定したフォント名とのマッチングを示してやればいいらしい.
だいたいこれ位の設定で日本語も表示できるようになる模様.
kojima@athlon64[~/Sample]% gs -sDEVICE=x11alpha texdemo....
GPL Ghostscript 8.60 (2007-08-01)
Copyright (C) 2007 Artifex Software, Inc. All rights re...
This software comes with NO WARRANTY: see the file PUBLI...
Loading a TT font from /usr/share/ghostscript/fonts/ipam...
Loading a TT font from /usr/share/ghostscript/fonts/ipag...
Loading NimbusSanL-Regu font from /usr/share/ghostscript...
>>showpage, press <return> to continue<<
一応,手元でパッケージ化したものを
ftp://plamo.linet.gr.jp/pub/Plamo-test/for-5.0/ghostscrip...
に置いたので興味ある人は試してみてください.
-パッケージの位置が違うようです。ダウンロードできません。...
-おっと失礼、修正しておきました。なお、このパッケージでは...
---disable-compile-inits と「s」が必要なのではないでしょ...
-へい、そうでした > --disable-compile-inits とりあえず記...
#comment
終了行:
[[diary/Kojima]]
・ghostscript-8.60
CUPSが使っている ESP Ghostscript をマージしたバージョンが...
のでビルド.ビルド自体は問題なかったんだけど,日本語のフ...
わりで結構ハマったので備忘録.
基本的には,
[[Ghostscript 8.60 を CentOS4.0 にインストール:http://d.h...
[[ghostscript 8.54 をインストール:http://centos.it-cafe.j...
それらを整理した手順.
- configure 時に --disable-compile-inits を指定
これを指定しないと,コンパイル時に初期化情報が埋め込まれ...
gs_res.ps の修正とかも読まれないらしい.
- lib/gs_res.ps の修正
gs_res.ps で /FontResoueceDir を指定している部分に日本語...
を置くディレクトリを指定
*** ./ghostscript-8.60/lib/gs_res.ps 2007-02-21 08:54:19...
--- ./gs_res.ps 2007-10-25 22:51:08.000000000 +0900
***************
*** 317,326 ****
} if
pssystemparams begin
.default_resource_dir
! /FontResourceDir (Font) .resource_dir_name
! readonly .forcedef % pssys'params is r-o
! /GenericResourceDir () .resource_dir_name
! readonly .forcedef % pssys'params is r-o
pop % .default_resource_dir
/GenericResourcePathSep
.file_name_separator readonly .forcedef % pssys'pa...
--- 317,326 ----
} if
pssystemparams begin
.default_resource_dir
! /FontResourceDir (/usr/share/ghostscript/8.60/Resour...
! readonly .forcedef % pssys'params is r-o
! /GenericResourceDir (/usr/share/ghostscript/8.60/Res...
! readonly .forcedef % pssys'params is r-o
pop % .default_resource_dir
/GenericResourcePathSep
.file_name_separator readonly .forcedef % pssys'pa...
- lib/cidfmap に日本語のフォントの情報を追加
/Ryumin-Light << /FileType /TrueType /Path (ipam....
/GothicBBB-Medium << /FileType /TrueType /Path (ipag....
/Ryumin-Medium /Ryumin-Light;
/HeiseiMin-W3 /Ryumin-Light;
/HeiseiKakuGo-W5 /GothicBBB-Medium;
/Kochi-Mincho /Ryumin-Light;
/Kochi-Gothic /GothicBBB-Medium;
/Adobe-Japan1 /Ryumin-Light;
/Adobe-Japan2 /Ryumin-Light;
/FutoMinA101-Bold /Ryumin-Light ;
/FutoGoB101-Bold /GothicBBB-Medium ;
/GothicMB101-hea /GothicBBB-Medium ;
/ShinGo-Bold /GothicBBB-Medium ;
ここで,ipa{m,g}.ttf はフルパスではなくフォント名だけで指...
/usr/share/ghostscript/fonts にリンクを作成する必要あり.
# フルパスだと CUPS 等に送った時とかにエラーになる模様
- gs_res.ps に指定した
FontResouceDir(/usr/share/ghostscript/8.60/Resource/CIDFo...
Spec ファイルを用意
drwxr-xr-x kojima/users 0 CIDFont/
-rw-r--r-- kojima/users 298 CIDFont/GothicBBB-Me...
-rw-r--r-- kojima/users 298 CIDFont/GothicBBB-Me...
-rw-r--r-- kojima/users 282 CIDFont/Ryumin-Light...
-rw-r--r-- kojima/users 282 CIDFont/Ryumin-Light...
このファイルの中身は
%! Font Specification
%%Title: GothicBBB-Medium-EUC-H
%%CreationDate: 06/xx/xx
%%ModificationDate: 06/xx/xx
%%EndComments
%%BeginResource: font GothicBBB-Medium-EUC-H
(GothicBBB-Medium-EUC-H)
(EUC-H) /CMap findresource
[(GothicBBB-Medium) /CIDFont findresource]
composefont pop
%%EndResource
%%EOF
こんな感じで,EUC-H のコーディングと GothicBBB-Medium と...
指定したフォント名とのマッチングを示してやればいいらしい.
だいたいこれ位の設定で日本語も表示できるようになる模様.
kojima@athlon64[~/Sample]% gs -sDEVICE=x11alpha texdemo....
GPL Ghostscript 8.60 (2007-08-01)
Copyright (C) 2007 Artifex Software, Inc. All rights re...
This software comes with NO WARRANTY: see the file PUBLI...
Loading a TT font from /usr/share/ghostscript/fonts/ipam...
Loading a TT font from /usr/share/ghostscript/fonts/ipag...
Loading NimbusSanL-Regu font from /usr/share/ghostscript...
>>showpage, press <return> to continue<<
一応,手元でパッケージ化したものを
ftp://plamo.linet.gr.jp/pub/Plamo-test/for-5.0/ghostscrip...
に置いたので興味ある人は試してみてください.
-パッケージの位置が違うようです。ダウンロードできません。...
-おっと失礼、修正しておきました。なお、このパッケージでは...
---disable-compile-inits と「s」が必要なのではないでしょ...
-へい、そうでした > --disable-compile-inits とりあえず記...
#comment
ページ名: