help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Chinese characters missing in .ps output file


From: James Cloos
Subject: Re: Chinese characters missing in .ps output file
Date: Tue, 23 Dec 2008 17:22:22 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

The real answer for how to obtain ps or pdf from text supporting all of
unicode is to use libraries like cairo and pango.  Cairo knows how to
embed all of the typical outline fonts in both ps and pdf, and pango can
handle formatting the plain text for even complex scripts like Arabic
or Tibetan.

Emacs will eventually have such support (when compiled with m17n and
libotf), but it does not yet.  Until then, a bit of elisp can output a
given buffer to a script in eg perl or python -- or a compiled C, C++
or similar program -- which uses pangocairo to create a ps or pdf file
to submit to lp or lpr.  (call-process-region) is the elisp function to
call, using (point-min) and (point-max) as the first two args, to send
the buffer's contents to the external program or script.

You could also try going through CJKlatex, or if in a gui saving the
buffer and using something like gedit or firefox to view the file; both
of those (if using the current versions) use pango and cairo to output
ps or pdf for printing.

If you want to do it directly from emacs, you will need to write some
code.  If you don't mind using another gui program, reasonably current
versions of web browsers and the default gnome/kde text editors should
as well.  (The latter may be painful for editing, but you'd only need
to load the file and select print from the menu....)

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]