How to Compile and Install
Ghostscript 6.0 + Japanese vflib patch
The advantage of this installation is that it is quite fast and doesn't
need any other fonts installed. However you have to recompile the
ghostscript to understand Japanese vflib. For other installations see
the bottom of this page.
1. Environment:
Solaris 2.6/7,8, X11R6.3, gcc-2.8.x or better
(Note that gcc-2.7.2 or earlier may not compile some versions of ghostscript!)
2. Source:
The following packages from the
original ghostscript distribution
are required:
(Get these from any CTAN ftp archive near you.)
- ghostscript-6.0.tar.gz
- ghostscript-6.0jpeg.tar.gz
- ghostscript-6.0zlib.tar.gz
- ghostscript-6.0libpng.tar.gz
And these additional patch and vflib packages:
3. Installation Scripts/Guide:
- Compile and install vflib. Instructions
may be found here.
- Compile and install ghostscript:
Suppose that you want to have ghostscript binary and library
files installed in
/usr/local/bin/gs6.0vflib
and
/usr/local/lib/gs/6.0vflib
respectively. The do the followings:
% zcat ghostscript-6.0.tar.gz | tar xvf -
% zcat ghostscript-6.0jpeg.tar.gz | tar xvf -
% zcat ghostscript-6.0zlib.tar.gz | tar xvf -
% zcat ghostscript-6.0libpng.tar.gz | tar xvf -
% mv jpeg-6b gs6.0/jpeg
% mv zlib-1.1.3 gs6.0/zlib
% mv libpng-1.0.3 gs6.0/libpng
% cd gs6.0
% patch -p1 < SOME_PATH/gs-jpatch
% patch -p1 < SOME_PATH/gs6.0-jpdf-exp.patch
% cp src/unix-gcc.mak src/unix-gcc.mak.old
Then edit unix-gcc.mak file and change the following
points in it:
--------------------------------------------------------
bindir = $(exec_prefix)/bin/gs6.0vflib
datadir = $(prefix)/lib
gsdir = $(datadir)/gs
GS_LIB_DEFAULT=$(gsdatadir)/lib:$(gsdir)/fonts:$(gsdatadir)/fonts
EXTRALIBS= -lnsl -lsocket
XINCLUDE=-I/usr/X11R6/include
XLIBDIRS=-L/usr/X11R6/lib
XLIBS=Xt SM ICE Xext X11
VFLIBS=VFlib2 ttf
--------------------------------------------------------
Then do:
% cd gs6.0
% ln -s ./src/unixgcc.mak Makefile
% make
% make install
Then go to /usr/local/lib/gs/6.0vflib
and extract the following files:
ghostscript-fonts-std-6.0.tar.gz
ghostscript-fonts-other-6.0.tar.gz
- Now edit vfontcap with proper
setting of the True Type fonts in it!! (see below)
Don't have Japanese True Type fonts? As a hint, you may get them
from the Japanese version of Windows 3.1 or 95/98/NT
(please notice the copyrights of the Microsoft Co. and use them at your own risk.).
All you need is the following files:
| msgothic.tti | msmincho.tti |
| msgothic.ttc | msmincho.ttc |
Note that if you don't have tti files, you
can easily generate them using ttindex utility
that comes with VFlib source.
Suppose that you save these font files in
/usr/local/lib/vflib/ttf/ directory.
Then all you need is to add these lines to the vfontcap file.
###--------------------------
### TRUETYPE FONT (Windows fonts)
min|MicroSoft mincho:\
:ft=truetype:\
:ff=/usr/local/lib/vflib/ttf/msmincho:
goth|Microsoft gothic:\
:ft=truetype:\
:ff=/usr/local/lib/vflib/ttf/msgothic:
###--------------------------
4. Results:
/usr/local/bin/gs6.0vflib/
/usr/local/lib/gs/6.0vflib/
Notes:
Other Notes on compiling and installing ghostscript:
Go to Japanese HTML & CGI Lecture page.
This page was created by B.H. Far.
far
enel.ucalgary.ca
(Last modified: )
|