Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Japanese TeX: if you're really macho...



>>>>> "Stephen" == Stephen J Turnbull <turnbull@example.com> writes:


    Stephen> Yow!  OK, for all you folks who wish you had a Japanese
    Stephen> TeX you could integrate with Ghostscript, here's the
    Stephen> short synopsis.  I dunno when I'll get around to writing
    Stephen> up the whole thing in accurate detail with config files.
    Stephen> Sorry, but I left the apartment today at 8:00am and
    Stephen> tomorrow will start just as early and go just as late....

So what do you do when you a lot of time? :) 

Thanks.

I just recently got Ghostscript to work with wadalab fonts. It was one
hell of a battle and I now know quite a bit more about composite
postscript fonts, which are used for Kanji. I could not get the EUC or
sjis encodings to work at all, initialy. I won't bore you with the
details, but I finaly noticed that there was an extra PS file in the
tools directy called:

	Wadalab-mincho-0-12.ps 

from ftp.ipl.t.u-tokyo.ac.jp/Font/tools

Anyway, you take that file, put in the font path ( gs
--version will tell you the font path ) and make entries in the
Fontmap like:

/Wadalab-mincho-0-8		(Wadalab-mincho-0-8.ps) ;
/Wadalab-mincho-0-8-RKSJ	(Wadalab-mincho-0-8.ps) ;
/Wadalab-mincho-0-8-EUC		(Wadalab-mincho-0-8.ps) ;
/Wadalab-mincho-0-8-V		(Wadalab-mincho-0-8.ps) ;

The individual files for /Wadalab-mincho-0-8 have entries like

/Wadalab-mincho-0-8.r21		(jis-21.pfa)  ;
/Wadalab-mincho-0-8.r22		(jis-22.pfa)  ;
/Wadalab-mincho-0-8.r23		(jis-23.pfa)  ;
/Wadalab-mincho-0-8.r26		(jis-26.pfa)  ;
/Wadalab-mincho-0-8.r27		(jis-27.pfa)  ;
/Wadalab-mincho-0-8.r28		(jis-28.pfa)  ;

/Wadalab-mincho-0-8.r24		(min-0-8-24.pfa)  ;
/Wadalab-mincho-0-8.r25		(min-0-8-25.pfa)  ;
/Wadalab-mincho-0-8.r30		(min-0-8-30.pfa)  ;

When you use a font by doing something like:

/Wadalab-mincho-0-8 findfont 40 scalefont setfont
100 100 moveto <3021> show showpage

Ghostscript looks up the font Wadalab-mincho-0-8 in the Fontmap file
and finds that that it needs to run Wadalab-mincho-0-8.ps when it
needs a character from that font. Wadalab-mincho-0-8.ps. When GS
executes the second line above, Wadalab-mincho-0-8.ps figures out the
this is a JIS code and translates the character code such that it
knows which of Wadalab-mincho-0-8.rxx files the character lives in. It
then loads that font by consulting the Fontmap again by looking for
( in this example ) /Wadalab-mincho-0-8.r30. It finds (min-0-8-30.pfa)
and loads the all the characters in that file. It this sounds like it
is a sloow process, it is, but it does work. This same file
( Wadalab-mincho-0-12.ps ) works with jis-x208, but not with 212, I
think.

To use the Wadalab-mincho-0-12.ps for other fonts, such as I did in
the exaple, you need to change an number of lines that look like:

/Wadalab-mincho-0-12 CompNF
/Wadalab-mincho-0-12 VCompNF
/Wadalab-mincho-0-12 CompSJNF
/Wadalab-mincho-0-12 CompEUCNF

To be the Wadalab font you want.

You can make aliases for other font names and encodings like:

% Aliases for wadalab fonts

/Ryumin-Light-EUC-H		/Wadalab-mincho-0-8-EUC ;
/Ryumin-Light-Ext-RKSJ-H	/Wadalab-mincho-0-8-RKSJ ;
/GothicBBB-Medium-EUC-H		/Wadalab-gothic-0-13-EUC ;
/GothicBBB-Medium-RKSJ-H	/Wadalab-gothic-0-13-RKSJ ;

The other option is to concatinate all the min-0-8-*.pfs files into
one and load them all at once. This works, though I could not get one
of the fonts to work, GS barfed on it.

I could not get this to work for sjis. From my notes:

gs_kanji.ps and gs_ksb_e.ps are used by wftopfa.ps to produce a a
single font file that is then accessed like:

/Wadalab-SaiMincho (wmin0.ps) ;

Looks like gs_kanji should produce encodings for JIS and ??

jis  3441 kan in kanji - displays ok
sjis 8abf              - displays as /
euc  b4c1	       - displays OK !

Hope this adds a few more pieces to the puzzle.

One bit of hope for future. Adobe has come up with a new method,
called CID, if memory serves, for handling various encodings that is
supposed to be much faster, and as a demonstration, to used the
Wadalab fonts.  Ghostscript does not yet support this, though someone
has. See gs_cidfn.ps in the gs distribution if your interested.

Andy






-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links