From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: Printing Date: Wed, 01 Apr 2009 12:24:41 +0800 Message-ID: <49D2EC89.3000508@gnu.org> References: <5f0660120903280331y780c80b7i57a8115dc4b029eb@mail.gmail.com> <5f0660120903281352v5d7ab83cy44fcff3cbf4581cb@mail.gmail.com> <87ljqnkvn9.fsf@jehiel.elehack.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1238559938 25377 80.91.229.12 (1 Apr 2009 04:25:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Apr 2009 04:25:38 +0000 (UTC) Cc: michael@elehack.net, Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 01 06:26:56 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Los2R-0001YQ-Ix for ged-emacs-devel@m.gmane.org; Wed, 01 Apr 2009 06:26:55 +0200 Original-Received: from localhost ([127.0.0.1]:36498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Los13-00008d-Vi for ged-emacs-devel@m.gmane.org; Wed, 01 Apr 2009 00:25:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Los0y-00008Y-Jz for emacs-devel@gnu.org; Wed, 01 Apr 2009 00:25:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Los0u-00008M-Ah for emacs-devel@gnu.org; Wed, 01 Apr 2009 00:25:24 -0400 Original-Received: from [199.232.76.173] (port=56002 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Los0u-00008J-7N for emacs-devel@gnu.org; Wed, 01 Apr 2009 00:25:20 -0400 Original-Received: from mk-outboundfilter-5-a-2.mail.uk.tiscali.com ([212.74.114.4]:25799) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Los0s-0000FZ-Ap; Wed, 01 Apr 2009 00:25:18 -0400 Original-X-Trace: 145754647/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/61.4.103.130/None/jasonr@gnu.org X-SBRS: None X-RemoteIP: 61.4.103.130 X-IP-MAIL-FROM: jasonr@gnu.org X-MUA: Thunderbird 2.0.0.21 (Windows/20090302) X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvABAASJ0kk9BGeC/2dsb2JhbAAIzkCDegY X-IronPort-AV: E=Sophos;i="4.39,305,1235952000"; d="scan'208";a="145754647" X-IP-Direction: OUT Original-Received: from unknown (HELO [10.1.1.112]) ([61.4.103.130]) by smtp.f2s.tiscali.co.uk with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Apr 2009 05:25:14 +0100 User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109960 Archived-At: Eli Zaretskii wrote: > The way every modern platform does that: through a printer API, > whereby you select fonts and layout, then render text to some device, > and the text gets printed to the printer you select. Since Emacs > already knows how to render text, it shouldn't be too hard to teach it > do so to something other than a screen. > The problem is that the way Emacs renders text, even in GUI toolkits, is based more on the way text is rendered on tty devices than on the standard way of rendering text in the GUI toolkit. That does make it somewhat harder to teach Emacs to render to a printer than it is for other native GTK, NS or Windows apps. ps-print is probably actually closer to what we need as a starting point than the existing redisplay code, as it already takes care of pagination (albeit assuming a constant font height apart from the header and footer), which is usually the difficult part of implementing printing support in a GUI app. FWIW, I agree that printing would be better done that way, but given the complications of understanding and modifying the existing redisplay code, it will probably be another 10 years before it is, and will probably come out of something like a port of Emacs redisplay to cairo rather than a dedicated effort to add printing support to existing platform specific code.