copyright


How to Compile and Install
Ghostscript 6.50 + CID fonts for Japanese


The advantage of this installation is that it doesn't need recompiling the already installed ghostscript. You just add CID keyed fonts to it to display other languages such as Japanese, Chinese and Korean. Of course ghostscript will be slower than the original English version. For other installations see the bottom of this page.

1. Environment:

Solaris 6, 7, 8

2. Source:

The following packages from the original ghostscript distribution are required:
(Get these from any AFPL ftp archive near you.)
  • ghostscript-6.50.tar.gz
  • ghostscript-6.50jpeg.tar.gz
  • ghostscript-6.50zlib.tar.gz
  • ghostscript-6.50libpng.tar.gz
  • ghostscript-fonts-std-6.0.tar.gz

And these additional packages:
(Many thanks to Mr. Taiji Yamada for providing TTF patch and CID font installer packages.)

  1. TTF patch for ghostscript:
    http://www.aihara.co.jp/~taiji/tops/ gs6.50_ttf.ps-cjkv-20001215.patch.gz

  2. CID font installer:
    http://www.aihara.co.jp/~taiji/tops/ install-cid-20010104.tar.gz

  3. CMap files for Japanese:
    ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/ aj14.tar.Z
       and   
    ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/ aj20.tar.Z

  4. Japanese CID fonts package:
    ftp://ftp.adobe.com/pub/adobe/acrobatreader/unix/4.x/ jpnfont.tar.gz
    from Adobe that comes with Acrobat 4.x and is downloadable at no charge from Adobe's ftp site. Please read the copyright notice of the font packages and use them at your own risks.

I explain about Japanese herewith. Setup for the other langauages, such as Korean and Chinese, shall be similar.

3. Installation Scripts/Guide:

  1. Get the binary or compile and install ghostscript.
  2. Suppose that you install the library files in
    /usr/local/lib/gs/6.50/* directory.
    Also suppose that you put all the above mentioned packages and patch files in a temporary directory, such as /tmp/gs.
    Then go to /usr/local/lib/gs/6.50/ and extract the following package there:
            ghostscript-fonts-std-6.0.tar.gz
    
    This creates /usr/local/lib/gs/6.50/fonts directory with the ghostscript fonts installed in it.
           % cd  /usr/local/lib/gs/6.50
           % gzcat  ghostscript-fonts-std-6.0.tar.gz  | tar xvf -
    
  3. Then, go to /usr/local/lib/gs/6.50/lib and patch gs_ttf.ps to understand CID keyed fonts.
           % cd /usr/local/lib/gs/6.50/lib
           % cp gs_ttf.ps gs_ttf.ps.old
           % patch < /tmp/gs/gs6.50_ttf.ps-cjkv-20001215.patch
    
  4. Then go to the root directory of your machine and make a directory named Resource, if you don't already have one. Then execute the followings:
           % cd /
           % mkdir  Resource  Resource/TrueType  Resource/CMap 
           % mkdir  Resource/CIDFont  Resource/Font
    
           % cd  Resource/TrueType
           % gzcat /tmp/gs/cjkvttcidmap-0.92.tar.gz  | tar xvf -
    
           % cd  /Resource
           % gzcat  /tmp/gs/install-cid-20010104.tar.gz  | tar xvf -
           % gzcat  /tmp/gs/aj14.tar.Z  | tar xvf -
           % gzcat  /tmp/gs/aj20.tar.Z  | tar xvf -
    
           % cd  /Resource/CMap
           % ln -s  ../aj14/CMap/* .
           % ln -s  ../aj20/CMap/* .
    
           % cd  /tmp/gs
           % gzcat  jpnfont.tar.gz  | tar xvf -
           % cd  JPNKIT
           % tar  -xvf  LANGJPN.TAR
    
           % cd  /Resource/CIDFont
           % cp  /tmp/gs/JPNKIT/CIDFont/HeiseiMin-W3-Acro .
           % cp  /tmp/gs/JPNKIT/CIDFont/HeiseiKakuGo-W5-Acro .
    
           % cd /Resource
           % alias-aj14.sh  install  Ryumin-Light=HeiseiMin-W3-Acro
           % alias-aj20.sh  install  Ryumin-Light=HeiseiMin-W3-Acro
           % alias-aj14.sh  install  GothicBBB-Medium=HeiseiKakuGo-W5-Acro
           % alias-aj20.sh  install  GothicBBB-Medium=HeiseiKakuGo-W5-Acro
    
    

  5. That is all. Now your machine can display Ryumin-Light and GothicBBB-Medium font family using HeiseiMin-W3-Acro and HeiseiKakuGo-W5-Acro CID keyed fonts. Please note that using Adobe's fonts is not a necessity. If you have access to other CID keyed fonts, they can be used instead of those of Adobe in a pretty similar way.

  6. Please see Taiji Yamada's Tips on Postscript for more details and to find how to use TTF fonts with Ghostscript in Unix.

Notes:

  • Remember to edit the /usr/local/bin/gs6.50/ps2pdfwr file and add the -sPAPERSIZE=a4 to it, if you want to use A4 papers instead of default letter size PDF files. Edit it like this:
    exec gs $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=a4 -sOutputFile=$outfile $OPTIONS -c save pop -f $infile

  • Get ghostview or gv as a front-end user interface and install it as well. This makes it easiser to deal with the options of the ghostscript interpretor.


Other Notes on compiling ghostscript:

Go to HTML & CGI Lecture page.

This page was created by B.H. Far.


far e-mail enel.ucalgary.ca

(Last modified: )