From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: James Cloos Newsgroups: gmane.emacs.help Subject: Re: Chinese characters missing in .ps output file Date: Tue, 23 Dec 2008 17:22:22 -0500 Message-ID: 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 1230071035 12476 80.91.229.12 (23 Dec 2008 22:23:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Dec 2008 22:23:55 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Rodolfo Medina Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 23 23:24:58 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 1LFFgQ-0002sa-AQ for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Dec 2008 23:24:58 +0100 Original-Received: from localhost ([127.0.0.1]:40848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LFFfD-0005Ot-DT for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Dec 2008 17:23:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LFFea-0005On-F3 for help-gnu-emacs@gnu.org; Tue, 23 Dec 2008 17:23:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LFFeZ-0005Ob-PR for help-gnu-emacs@gnu.org; Tue, 23 Dec 2008 17:23:03 -0500 Original-Received: from [199.232.76.173] (port=33620 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LFFeZ-0005OY-JE for help-gnu-emacs@gnu.org; Tue, 23 Dec 2008 17:23:03 -0500 Original-Received: from eagle.jhcloos.com ([207.210.242.212]:59787) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LFFeZ-0001y9-Bk for help-gnu-emacs@gnu.org; Tue, 23 Dec 2008 17:23:03 -0500 Original-Received: by eagle.jhcloos.com (Postfix, from userid 10) id C449D40090; Tue, 23 Dec 2008 22:22:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jhcloos.com; s=eagle; t=1230070981; bh=Q937NNwvZN70y2HUn99xgzOXLXBT/ff+KmAPbZUMy sg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=q9BmGpfWFI4u/lPzFP2KIf5RHn9X3kC4jpeA9 JFwc6AfPRRD2Nn0WbsllkCDfj9Urt5WIWHBfbeMiZk4Xo6gBBkTwNOKqePAu00v2eJV EHdc7q8SSCng6ybx4wQKfMww3kYABI8VR+HHjlVhrDJj9t3F1lGgEzNwULWFHP9sFKM = Original-Received: by lugabout.jhcloos.org (Postfix, from userid 500) id EA2B5A34C; Tue, 23 Dec 2008 22:22:45 +0000 (UTC) In-Reply-To: <87wsdsgqta.fsf@gmail.com> (Rodolfo Medina's message of "Mon, 22 Dec 2008 15:41:53 +0000") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAI1J REFUOE+lU9ESgCAIg64P1y+ngUdxhl5H8wFbbM0OmUiEhKkCYaZThXCo6KE5sCbA1DDX3genvO4d eBQgEMaM5qy6uWk4SfBYfdu9jvBN9nSVDOKRtwb+I3epboOsOX5pZbJNsBJFvmQQ05YMfieIBnYX FK2N6dOawd97r/e8RjkTLzmMsiVgrAoEugtviCM3v2WzjgAAAABJRU5ErkJggg== Copyright: Copyright 2008 James Cloos OpenPGP: ED7DAEA6; url=http://jhcloos.com/public_key/0xED7DAEA6.asc OpenPGP-Fingerprint: E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6 Original-Lines: 28 X-Hashcash: 1:23:081223:rodolfo.medina@gmail.com::KEIoOBc/mZPMKSUg:00000000000000000000000000000000000001KeQ X-Hashcash: 1:23:081223:help-gnu-emacs@gnu.org::XW/R76ONGL4JkUmq:000000000000000000000000000000000000001OmrX X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:60915 Archived-At: 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 OpenPGP: 1024D/ED7DAEA6