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

Re: Newbie questions...



>>>>> "debian-jp" == debian-jp  <debian-jp@here.ch> writes:

>   b) How can I *print* Japanese text? Trying 'ps-print' from within
> xemacs doesn't work (I get a message about some fonts missing; and
> subsequently the japanese portion of the text ends up blank on the
> printed paper)...

There are two ways which work very well for me with GNU Emacs 21.  If
you just do `M-x ps-spool-buffer'.  Emacs appends the Postscript print
output to the buffer *PostScript* which you can then save to a file.  It
will only work for japanese text if you set `ps-multibyte-buffer' to
`non-latin-printer' (try `M-x customize-group ps-print-font').

Try to view it with `gv'.  It should display corretly, if you have
postscript fonts for japanese installed.  There are neat fonts available
in Debian Woody.  Even TTF, I think.  All managed through defoma (? I'm
not sure I just don't understand Debian font management).  If you
install the right package everything should run out-of-the-box.  I don't
know which package supplies the fonts that I'm currently using.  Does
anybody know?  Maybe dselect suggest those packages when you install
`psfontmgr'?

If `gv' shows the fonts, you can embed the font into your postscript
file via `ps2ps' which should make the text print directly on any
non-japanese postscript printer.  Any other printer you have a driver
for should work as well.

A maybe simpler alternative for creating a printable postscript version
of a plain japanese text file, is using `e2ps', included in Woody.  You
will also need to filter the output with `ps2ps' if you want to print on
non-japanese printers.

Before Debian supported printing japanese postscript files in Potato (at
least I didn't know how to do it), I used BDF-Fonts which `ps-print' can
embed into your PostScript output.  They don't look very neat, but work
very well for many languages.  The BDF fonts are contained in the
`xfonts-intl-*' _source_ packages.

You need to setup emacs correctly.  Here's what I use in my .emacs:

(if (boundp 'bdf-directory-list)
    (progn
      (setq ps-multibyte-buffer 'bdf-font)
      (setq bdf-directory-list (list bdf-directory-list 
				     "/usr/src/intlfonts-1.1/European"
				     "/usr/src/intlfonts-1.1/Misc"
				     "/usr/src/intlfonts-1.1/Japanese"
				     "/usr/src/intlfonts-1.1/Japanese-BIG"
				     "/usr/src/intlfonts-1.1/Japanese-X"))))

David
-- 
GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40



Reply to: