From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rodolfo Medina Newsgroups: gmane.emacs.help Subject: Re: Chinese characters missing in .ps output file Date: Wed, 24 Dec 2008 19:15:36 +0000 Organization: SunSITE.dk - Supporting Open source Message-ID: <877i5pz8o7.fsf@gmail.com> References: <87zliqq21s.fsf@gmail.com> <87lju9tgn7.fsf@gmail.com> <87prjl895u.fsf@gmail.com> <87wsdsgqta.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1230144115 7706 80.91.229.12 (24 Dec 2008 18:41:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Dec 2008 18:41:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 24 19:43:01 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LFYgq-00036N-8J for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Dec 2008 19:42:40 +0100 Original-Received: from localhost ([127.0.0.1]:53358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LFYfd-0007Cd-Fd for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Dec 2008 13:41:25 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!xlned.com!feeder1.xlned.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!news.banetele.no!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:OBFwMmCfzlebSS11oqwfW0ionZc= Original-Lines: 43 Original-NNTP-Posting-Host: 151.82.20.205 Original-X-Trace: news.sunsite.dk DXC=3C1Z7Gg0hQ; @@_Mk5OIoD3YSB=nbEKnk; CA74; ^LPKQ3:AocXk=\=_4T7bXfBO; G:5KAib\KDO`h2\kGdmDA3=I9jH5]SnNb; l6g; l\0IY1L_8 Original-X-Complaints-To: staff@sunsite.dk Original-Xref: news.stanford.edu gnu.emacs.help:165590 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60921 Archived-At: Rodolfo Medina 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 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