
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tlug] Re: Mozilla printing question.
"Stephen J. Turnbull" <stephen@example.com> writes:
>>>>>> "Jim" == Jim Breen <jwb@example.com> writes:
>
> Jim> A Mozilla question about printing Japanese text. Mozilla
> Jim> happily shows the text on screen, displays it right in print
> Jim> preview, but seems only to send the code-points and font
> Jim> details to the (Postscript) printer. Since few printers in
> Jim> this land actually have Japanese fonts installed, the results
> Jim> are not very useful.
>
> Ghostscript will do PS to PS, but I forget the details.
>
> ps2ps may or may not do what you need it to do. I haven't had a
> postscript printer for a while, but I seem to recall that you needed
> to tell Ghostscript to embed the fonts in the output .ps, or you just
> got "simpler and faster" spew of formatting and codepoints. ;-)
ps2ps does what Jim wants. It is just a simple shell script
mfabian@example.com:~$ cat /usr/bin/ps2ps
#!/bin/sh
# $RCSfile: ps2ps,v $ $Revision: 1.2.2.1 $
# "Distill" PostScript.
OPTIONS="-dSAFER"
while true
do
case "$1" in
-*) OPTIONS="$OPTIONS $1" ;;
*) break ;;
esac
shift
done
if [ $# -ne 2 ]; then
echo "Usage: `basename $0` ...switches... input.ps output.ps" 1>&2
exit 1
fi
exec gs -q -sDEVICE=pswrite -sOutputFile=$2 -dNOPAUSE -dBATCH $OPTIONS $1
mfabian@example.com:~$
writing to the 'pswrite' device. That seems to be all what is needed,
for example:
PostScript file using Japanese fonts:
mfabian@example.com:/tmp$ cat arare-Ryumin-Light-H.ps
%% -*- coding: euc-jp -*-
/Ryumin-Light-EUC-H findfont 300 scalefont setfont
50 200 moveto (霰) show showpage
displaying it directly with gs shows that Japanese fonts are loaded:
mfabian@example.com:/tmp$ gs arare-Ryumin-Light-H.ps
GNU Ghostscript 6.53 (2002-02-13)
Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file COPYING for details.
Loading min-EUC font from /usr/share/ghostscript/fonts/min.gsf... Can't find (or can't open) font file /Resource/Font/NotDefFont.
Can't find (or can't open) font file NotDefFont.
Substituting font Courier for NotDefFont.
Loading NimbusMonL-Regu font from /usr/share/ghostscript/fonts/n022003l.pfb... 2278032 828937 2526744 850653 0 done.
Can't find (or can't open) font file /Resource/Font/NotDefFont.
Can't find (or can't open) font file NotDefFont.
Substituting font Courier for NotDefFont.
2278032 830908 2868376 1031383 0 done.
Loading min-70ku font from /usr/share/ghostscript/fonts/min-70ku.gsf... 2338320 893503 2868376 1037603 0 done.
>>showpage, press <return> to continue<<
quit
mfabian@example.com:/tmp$
converting it to pswrite:
mfabian@example.com:/tmp$ ps2ps arare-Ryumin-Light-H.ps arare-Ryumin-Light-H.pswrite
Now Ghostscript doesn't load any fonts are loaded anymore because they
are already embedded as outline graphics:
mfabian@example.com:/tmp$ gs arare-Ryumin-Light-H.pswrite
GNU Ghostscript 6.53 (2002-02-13)
Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file COPYING for details.
>>showpage, press <return> to continue<<
quit
mfabian@example.com:/tmp$
I.e. this can be printed on any PostScript printer.
I'm using that often because I don't have a PostScript printer with
Japanese fonts either.
Another possibility is to write the output directly to the a device
which works for your printer, e.g. ljet4 if you have a Laserjet4
printer and send the result on a raw (non-PostScript) printer queue.
--
Mike Fabian <mfabian@example.com> http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。
Home |
Main Index |
Thread Index