/GenericResourceDir (/usr/local/share/ghostscript/Resource/) readonly .forcedefIf you also want to change /Resource/Font directory, in the case of GS 6.01, please modify /FontResourceDir in gs_res.ps as follows:
/FontResourceDir (/usr/local/share/ghostscript/Resource/Font/) readonly .forcedefBut, in the case of GS 6.0, modifying /FontResourceDir doesn't work because gs_res.ps has a bug at about 670th line. The correct code is 4 times 'pop' not 5 times as follows:
pop pop pop pop true exit
First, please obtain following CMap files from ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/,
% cd /usr/local/share/ghostscript/ResourcePlease make /Resource/CMap directory and link CMap files to this directory,
% tar xvZf ac13.tar.Z
% mkdir CMapand make /Resource/CIDFont and /Resource/Font directories.
% cd CMap
% ln -s ../ac13/CMap/* .
% cd /usr/local/share/ghostscript/ResourceNext, obtain one of following CID-Keyed fonts from ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/samples/.
% mkdir CIDFont
% mkdir Font
Here, please get install-cid-*.tar.gz which is a simple installer of CID-keyed fonts and extract this archive in /Resource directory.
% cd /usr/local/share/ghostscript/ResourceTo apply all CMap resources of Adobe-CNS1 to MOEKai-Regular, please try to execute as follows:
% tar xvzf install-cid-20010208.tar.gz
% ac13.sh install MOEKai-Regularthen, all resource files are automatically generated in /Resource/Font directory. One of /Resource/Font/MOEKai-Regular-* is shown as follows:
%!PS-Adobe-3.0 Resource-FontNow, on GS 6, you can use /MOEKai-Regular-ETen-B5-H, /MOEKai-Regular-UniCNS-UCS2-H and so on.
%%DocumentNeededResources: ETen-B5-H (CMap)
%%IncludeResource: ETen-B5-H (CMap)
%%BeginResource: Font (MOEKai-Regular-ETen-B5-H)
/MOEKai-Regular-ETen-B5-H
/ETen-B5-H /CMap findresource
[/MOEKai-Regular /CIDFont findresource]
composefont pop
%%EndResource
%%EOF
% ac13.sh uninstall MOEKai-Regular
% cd /usr/local/share/ghostscript/ResourceFirst, please be guided by procedures described in ``How to install CJK CID-Keyed fonts to Ghostscript 6'' until preparing a simple installer of CID fonts, install-cid-*.tar.gz.
% mkdir TrueType
% cd TrueType
% tar xvzf cjkvttcidmap-0.92.tar.gz
To build a CID-Keyed font from a TrueType font and apply all CMap resources of Adobe-CNS1 to the generated CIDFont resource, please try to execute as follows:
% cd /usr/local/share/ghostscript/Resourcethen, /Resource/CIDFont/AcademyBIG5 is generated and is shown as follows:
% alias-ac13.sh install AcademyBIG5=Abig5.ttf
%!PS-Adobe-3.0 Resource-CIDFontand all resource files are also generated in /Resource/Font directory by internally using ac13.sh in alias-ac13.sh. One of /Resource/Font/AcademyBIG5-* is shown as follows:
%%BeginResource: CIDFont (AcademyBIG5)
/AcademyBIG5
(/usr/local/share/fonts/truetype/Abig5.ttf) .openttcidfont
dup length dict begin {def} forall currentdict end
/CIDFont defineresource pop
%%EndResource
%%EOF
%!PS-Adobe-3.0 Resource-FontNow, on GS 6, you can use /AcademyBIG5-CNS1-H, /AcademyBIG5-UniCNS-UCS2-H, and so on.
%%DocumentNeededResources: CNS1-H (CMap)
%%IncludeResource: CNS1-H (CMap)
%%BeginResource: Font (AcademyBIG5-CNS1-H)
/AcademyBIG5-CNS1-H
/CNS1-H /CMap findresource
[/AcademyBIG5 /CIDFont findresource]
composefont pop
%%EndResource
%%EOF
% alias-ac13.sh uninstall AcademyBIG5
Direct the kind of CID in a font name not to automatically detect from a TrueType font
% alias-ac13.sh install Arial-Adobe-CNS1=arialuni.ttfDesignate an index of a TTC(TrueType Collection) font
% alias-ag13.sh install NSimSun=simsun.ttc,2Name alias ``Ryumin-Light'' a CID-keyed font ``MS-Mincho''
% alias-aj14.sh install Ryumin-Light=MS-MinchoDesignate an inverse map not to automatically detect from a TrueType font
% alias-aj14.sh install FA-Gothic,Adobe-Japan1-Unicode=FANGOT5.TTCInstall more than one font
% alias-ak12.sh install Batang=batang.ttc BatangChe=batang.ttc,2