Mailing List Archive

Support open source code!


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

tlug: Printing problems again (actually, still!)



>>>>> "Matthew" == Matthew C Gushee <matt@example.com> writes:

    Matthew>     /min { /Ryumin-Light-EUC-H findfont } def

    Matthew> whereas the ones that printed out okay have this:

    Matthew>     /of { /Ryumin-Light-RKSJ-H findfont exch scalefont
    Matthew> setfont } bind def

    Matthew> --seems like it might have something to do with my
    Matthew> troubles. Any ideas about this?

Bingo.  It's a damn shame JIS has no enforcement powers.  I don't know 
a general-purpose solution to this.  Best guess is below.

>>>>> "Masa" == Ucida Masatomo writes:

    Masa> There are 3 codes for Japanese Language. They are EUC
    Masa> (popular for Unix users), Shift-JIS (popular for Windows and
    Masa> Mac) and JIS (used for Internet communication).  It seems to
    Masa> me that your printer accepts Shift-JIS. So use 'use nkf -s'.
    Masa> Printing command is 'nkf -e file | lpr'.

    Masa> Good Luck.

He's gonna need more than good luck.  If the files are in binary
Postscript that _might_ work but he's still going to have to hack the
findfont commands.  If it's not in binary (and usually 8-bit strings
get translated to hex code, dunno about psconv), nkf won't do a thing.

    Matthew> If the above isn't the key, I wonder if there's something
    Matthew> really "obvious" that I don't have set up right

Nothing obvious.  Doing Japanese well is hard.  MS took the route of
redefining the standards to suit themselves, in a quasi-logical,
non-extensible, incompatible way.  Nice method if you have the
monopoly power to pull it off; of course it hoses the rest of the
world.  Thanks again, Bill.  But then, this is just SOP in Japan (see
Ken Lunde's book, count the number of corporate standards).

    Matthew> While we're at it . . . Ghostscript . . . augh!  I
    Matthew> installed a binary of Aladdin Ghostscript 5.01 and some
    Matthew> of the Wadalab fonts, and I can get kanji on-screen, but
    Matthew> no output to the printer. That's not just no kanji, I
    Matthew> mean no output whatsoever. Both
[ ... ]
    Matthew> wrong (note that my printer is not specifically supported
    Matthew> by GS, but since it's Postscript it should be possible to
    Matthew> print on it, shouldn't it?).

No.  Ghostscript is not easy to convince to convert Postscript to
Postscript.  (This is coming, especially in the forms of ps2pdf and
pdf2ps.  I'd like to be able to do Level-2 to Level-1, but I don't
think that works.)  Ghostscript is probably converting to Epson LX-80
or so graphics codes.  There may be a way to do what you want with
Ghostscript, but it also should be unnecessary, since you evident;y
have the fonts.

Since your printer really is Postscript and has Japanese fonts, then
what you need to do first is convince psconv to use the execrable
Microsoft RSKJ encoding.  Probably there is a config file for psconv
where the fonts are listed.  Or psconv may just autodetect the kanji
code in the file.  (There's no real excuse for the printer to accept
*-RSKJ-* encoding but refuse *-EUC-*; the fonts are identical, the
encoding translation is a simple algorithm which takes up at worst
32kB, and should be less than half that, actually---and doesn't need
to use any precious Postscript VM.  Thanks again, Bill.)

Then, you do something like

    cat my-japanese-file | jconv -os | psconv | lpr

I prefer jconv to nkf.  The source code is readable as are the
comments, and it never acts like it knows more about the contents of a
file than I do.  If you want to know what jconv thinks is in a file,
you use the `-c' switch.  If you want to override jconv's guess, use
`-i[sje]' option, where `s', `j', and `e' should be obvious.

	    ftp://ftp.uu.net/vendors/oreilly/nutshell/ujip

(I may have capitalization wrong, and I forget where the code lives
under that directory.)
Next TLUG meeting is Saturday Dec. 13, 1997  (possibly Nov. 13?)
---------------------------------------------------------------
a word from the sponsor:
TWICS - Japan's First Public-Access Internet System
www.twics.com  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