Mailinglist Archive: opensuse-m17n (69 mails)

< Previous Next >
Re: [m17n] suse 7.3 xemacs(mule) printing problem
  • From: Mike Fabian <mfabian@xxxxxxx>
  • Date: Thu, 2 May 2002 22:32:27 +0000 (UTC)
  • Message-id: <s3t3cxa2nba.fsf@xxxxxxxxxxxxxxx>
Mike Fabian <mfabian@xxxxxxx> writes:

> I.e. ps-print.el for XEmacs will likely work as soon as I update
> XEmacs.

I have updated the XEmacs packages for SuSE Linux now.

The core XEmacs is updated to version 21.4.6 and the lisp packages are
updated to the Sumo packages release from 2002-03-29.

The updated packages are available here:

ftp://ftp.suse.com/pub/people/mfabian/8.0-i386/xemacs-21.4.6-3.i386.rpm
ftp://ftp.suse.com/pub/people/mfabian/8.0-i386/xemacs-el-21.4.6-3.i386.rpm
ftp://ftp.suse.com/pub/people/mfabian/8.0-i386/xemacs-info-21.4.6-3.i386.rpm
ftp://ftp.suse.com/pub/people/mfabian/8.0-src/xemacs-21.4.6-3.src.rpm

Using these packages,

M-x ps-print-buffer

and

M-x ps-print-buffer-with-faces

or the 'pretty print' entry in the file menu work for CJK and many
other languages now. When using these functions to print, XEmacs will
generate the PostScript, you don't need any external a2ps converter
[1].

Extract from the comments at the top of

/usr/share/xemacs/xemacs-packages/lisp/ps-print/ps-mule.el

which explains the options to control the font selection for
multilingual printing:

;; Printing Multi-byte Buffer
;; --------------------------
;;
;; The variable `ps-multibyte-buffer' specifies the ps-print multi-byte buffer
;; handling.
;;
;; Valid values for `ps-multibyte-buffer' are:
;;
;; nil This is the value to use the default settings which
;; is by default for printing buffer with only ASCII
;; and Latin characters. The default setting can be
;; changed by setting the variable
;; `ps-mule-font-info-database-default' differently.
;; The initial value of this variable is
;; `ps-mule-font-info-database-latin' (see
;; documentation).
;;
;; `non-latin-printer' This is the value to use when you have a japanese
;; or korean PostScript printer and want to print
;; buffer with ASCII, Latin-1, Japanese (JISX0208 and
;; JISX0201-Kana) and Korean characters. At present,
;; it was not tested the Korean characters printing.
;; If you have a korean PostScript printer, please,
;; test it.
;;
;; `bdf-font' This is the value to use when you want to print
;; buffer with BDF fonts. BDF fonts include both latin
;; and non-latin fonts. BDF (Bitmap Distribution
;; Format) is a format used for distributing X's font
;; source file. BDF fonts are included in
;; `intlfonts-1.2' which is a collection of X11 fonts
;; for all characters supported by Emacs. In order to
;; use this value, be sure to have installed
;; `intlfonts-1.2' and set the variable
;; `bdf-directory-list' appropriately (see ps-bdf.el
;; for documentation of this variable).
;;
;; `bdf-font-except-latin' This is like `bdf-font' except that it is used
;; PostScript default fonts to print ASCII and Latin-1
;; characters. This is convenient when you want or
;; need to use both latin and non-latin characters on
;; the same buffer. See `ps-font-family',
;; `ps-header-font-family' and `ps-font-info-database'.
;;
;; Any other value is treated as nil.
;;
;; The default is nil.

If you want to print only ASCII, Latin-1 and Japanese

(setq ps-multibyte-buffer 'non-latin-printer)

is best because PostScript fonts are used which look nice.

When using bitmap fonts for printing with

(setq ps-multibyte-buffer 'bdf-font)

you can print more different languages (but of course
using low resolution bitmap fonts will look less beautiful,
so this is not a good setting of you want to print only Japanese).

For the printing with bitmap fonts you also need the GNU intlfonts in
bdf format, available here for SuSE Linux 7.3 and 8.0:

ftp://ftp.suse.com/pub/suse/i386/7.3/suse/gra2/intlfonts-bdf.rpm

With these fonts you can print most languages from the HELLO page

M-x view-hello-file

except Amharic, Thai, and Tigrina. These three languages can be
printed with GNU Emacs but not yet with XEmacs.

I had to patch ps-mule.el a little bit to make printing with bdf-fonts
work at all with XEmacs, but I could not yet find out how to make it
work for Amharic, Thai, and Tigrigna.

Therefore, when you want to test bdf-font printing with the hello
file, remove the lines with theses languages, otherwise you will get
an error (or, better, don't remove these lines, find out how to make
it work and tell me :-)).

Footnotes:
[1] for Wolfgang: this means you must remove your

(setq lpr-command "a2ps-lpr.pl")

hack if you want to use these new features.
Otherwise a2ps.pl will do a ASCII -> PostScript conversion
again on the output which is already PostScript.

--
Mike Fabian <mfabian@xxxxxxx> http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。

< Previous Next >
This Thread
  • No further messages