From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Pixel-based display functions Date: Mon, 02 Feb 2015 18:16:27 -0500 Message-ID: References: <87egqekrd7.fsf@building.gnus.org> <877fw53eat.fsf@building.gnus.org> <877fw4zsdv.fsf@building.gnus.org> <831tmcn4k4.fsf@gnu.org> <87386szq1w.fsf@building.gnus.org> <83wq44ljm9.fsf@gnu.org> <87vbjowlqv.fsf@building.gnus.org> <83oapglbx6.fsf@gnu.org> <83lhkkl23i.fsf@gnu.org> <83bnlgkl1s.fsf@gnu.org> <837fw3l7uz.fsf@gnu.org> <83wq42i9qn.fsf@gnu.org> <83r3u9iqx1.fsf@gnu.org> <83fvaogrex.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422919001 16469 80.91.229.3 (2 Feb 2015 23:16:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2015 23:16:41 +0000 (UTC) Cc: larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 03 00:16:36 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YIQEO-0005GJ-8o for ged-emacs-devel@m.gmane.org; Tue, 03 Feb 2015 00:16:36 +0100 Original-Received: from localhost ([::1]:57077 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIQEN-0003yr-Ik for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2015 18:16:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIQEK-0003ym-No for emacs-devel@gnu.org; Mon, 02 Feb 2015 18:16:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIQEJ-0008Vu-Qz for emacs-devel@gnu.org; Mon, 02 Feb 2015 18:16:32 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:37471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIQEG-0008VM-6O; Mon, 02 Feb 2015 18:16:28 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsPAOwQflRFxIJW/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCws0EhQYDSSISgnWWQEBAQcCAR+QbweESAWLAYxUl1qBeIQZIYJ3AQEB X-IPAS-Result: AjsPAOwQflRFxIJW/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCws0EhQYDSSISgnWWQEBAQcCAR+QbweESAWLAYxUl1qBeIQZIYJ3AQEB X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="109501100" Original-Received: from 69-196-130-86.dsl.teksavvy.com (HELO ceviche.home) ([69.196.130.86]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Feb 2015 18:16:27 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 361C666100; Mon, 2 Feb 2015 18:16:27 -0500 (EST) In-Reply-To: <83fvaogrex.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 02 Feb 2015 19:21:58 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182297 Archived-At: > Not necessarily, since an HTML browser doesn't need to implement all > the gazillion display features that redisplay needs to handle. Not > even close. It just needs to render text with faces and sometimes > with images. Right, it only needs to faithfully model the parts that it uses. That's still a lot of needless and hard work. > I agree, and it does. font-get-glyphs, window-text-pixel-size, > vertical-motion, etc. all reuse the display engine code. Right. So we should do our best to make sure this same approach can be used here. >> > Second, there's a subtlety in move_it_* functions that was never >> > explicitly raised in this discussion, but which becomes rather >> > important if you want to consider reusing the move_it_* functions for >> > this use case: they produce glyphs in the _visual_ order. So if the >> > text to be rendered includes R2L characters, you might break text >> > between screen lines incorrectly. (If this isn't clear enough, I can >> > elaborate.) Also, you will have to deal with the situation where >> > (position-of-pixel-in-text FROM TO) is _less_ than >> > (position-of-pixel-in-text FROM (1- TO)). That is a complication that >> > Lars would surely like to avoid, I presume. By contrast, >> > font-get-glyphs works in the logical order. >> I think solving this problem is *hard*. > I explicitly suggested a way that avoids the need to solve it. Hmm.. maybe you're right that doing it in the logical order will work. >> PS: who still would prefer refilling single-column text in the redisplay >> itself, since it makes it lazy, and makes it work right even when the >> buffer is displayed in different windows/frames with different fonts. > I agree that this feature would be useful. However, how to use it in > this case is not clear to me: recall that there's no buffer to render > here, Hmm... I don't follow. In the single-column case, SHR can generate the buffer text directly without worrying about line-wrapping (just setting up the redisplay line-wrapping according to the expected dimansions of the column). Stefan