From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Ligatures Date: Mon, 18 May 2020 22:33:53 +0300 Message-ID: <83pnb182ce.fsf@gnu.org> References: <20200517124125.000013a4@web.de> <97C7EAB7-10AB-4702-ABC8-EB6C1C50ABDB@gnu.org> <20200517165953.000044d2@web.de> <83lflqblp0.fsf@gnu.org> <83ftbybio3.fsf@gnu.org> <83zha69xs2.fsf@gnu.org> <83367x9qeq.fsf@gnu.org> <83y2pp88lw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="82739"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 18 21:35:03 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jalXS-000LQF-Vl for ged-emacs-devel@m.gmane-mx.org; Mon, 18 May 2020 21:35:02 +0200 Original-Received: from localhost ([::1]:44246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jalXR-0003sh-Ub for ged-emacs-devel@m.gmane-mx.org; Mon, 18 May 2020 15:35:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jalWP-0002U3-Al for emacs-devel@gnu.org; Mon, 18 May 2020 15:33:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35807) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jalWO-0001Ee-VA; Mon, 18 May 2020 15:33:56 -0400 Original-Received: from [176.228.60.248] (port=3039 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jalWO-0004ps-9F; Mon, 18 May 2020 15:33:56 -0400 In-Reply-To: (message from Pip Cet on Mon, 18 May 2020 19:19:19 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:250811 Archived-At: > From: Pip Cet > Date: Mon, 18 May 2020 19:19:19 +0000 > Cc: Stefan Monnier , emacs-devel@gnu.org > > > An alternative which might be nicer is to "split" the composition: > > display it as if a ZWNJ character was inserted at point. Thus, moving > > forward one buffer position into the ffi would show f followed by a thin bar > > cursor followed by the fi; moving forward one more buffer position > > would show ff followed by a thin bar cursor followed by i. Etc. > > I tried something like that (with a variable-pitch font), and the > effect is nauseating because the rest of the line shifts as the width > of the word at point changes. The idea is that this is used only rarely. Most use cases don't need to deconstruct a ligature that way; after all, that's what ligatures are for. > And this is where it gets back to "let's not hardcode the dependency > on Harfbuzz and FreeType, because other backends might actually give > us the information we need". You cannot avoid hardcoding something, because each shaper has its idiosyncrasies. But those are only limited to the implementation of the font driver interfaces described in font.h, they don't leak above that level. So if we will support such sub-glyph movements, we will probably introduce one more method into the font driver interface, and the display engine will use that.