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: Rodolfo Medina
Subject: Re: Chinese characters missing in .ps output file
Date: Wed, 24 Dec 2008 19:15:36 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.50 (gnu/linux)

Rodolfo Medina <rodolfo.medina@gmail.com> writes:

> With Emacs, I correctly open a file including chinese characters.  The
> characters are correctly displayed in the text file, but when I try to create
> the ps file, with `C-u M-x pr-ps-print-buffer-preview' or `C-u M-x
> pr-ps-print-buffer-print', they are not displayed.
>
> What am I missing, how can I work it out?


James Cloos <cloos@jhcloos.com> writes:

> 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....)



Well, since I'm not able to write any code, I only have to wait for Emacs to
have the support you mention...

Rodolfo


reply via email to

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