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: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY) Date: Sun, 17 May 2020 22:17:17 +0300 Message-ID: <83zha69xs2.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> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121262"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, julius.pfrommer@web.de To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 17 21:17:56 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 1jaOnM-000VRs-CF for ged-emacs-devel@m.gmane-mx.org; Sun, 17 May 2020 21:17:56 +0200 Original-Received: from localhost ([::1]:39684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaOnL-0007nE-E0 for ged-emacs-devel@m.gmane-mx.org; Sun, 17 May 2020 15:17:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaOmt-0007Nq-MM for emacs-devel@gnu.org; Sun, 17 May 2020 15:17:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36841) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaOmt-0000Cs-5N; Sun, 17 May 2020 15:17:27 -0400 Original-Received: from [176.228.60.248] (port=1137 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jaOms-0006RG-GM; Sun, 17 May 2020 15:17:26 -0400 In-Reply-To: (message from Pip Cet on Sun, 17 May 2020 18:50: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:250650 Archived-At: > From: Pip Cet > Date: Sun, 17 May 2020 18:50:19 +0000 > Cc: julius.pfrommer@web.de, emacs-devel@gnu.org > > HarfBuzz also tells you which codepoints are used for which glyphs. It > should also, for languages where it can do so, tell you which > codepoints are used for which subglyphs. It fails to do the latter. No, it doesn't fail. You can see what it tells us in the display of the composition produced by "C-u C-x =". > That one is simply unworkable for English and its limited traditional > set of ligatures. The main reason we want ligatures in Emacs is for displaying program source. Latin ligatures are not the main reason. But I see no reason we couldn't do what you want, it's just the question of someone who'd need to write the code. The information is there. > LibreOffice highlights sub-glyphs of ligatures correctly. I enter > "official", and it renders . I move the > cursor right twice, and it highlights precisely what it should, the > middle "f" of the ligature glyph. We can do that in Emacs as well. The information is there, we just need to use it. For Latin ligatures that information will allow the display you describe. Doing that for other scripts would be harder, and the results will be less one-to-one. > > The truth is that "we" the Emacs project don't want to know anything > > about ligatures, we want to delegate that job to the shaper. > > I don't see how that's true. Treating a ligature as a single character > for entry purposes is simply unworkable for English. I didn't say we must treat ligatures as a single character, I just said we do that now. But that has nothing to do with the fact that we want all the information about the ligature to come from the shaper. > out of the box, Emacs fails miserably to do anything about English > ligatures. Trying to find a way to fix it, I ran into HarfBuzz > limitations that appear to make it impossible to use it to deal with > English ligatures. It might deal very well with other languages and > their ligatures, but for English text, it fails to do what TeX did > since its inception. I don't think this is right, but since you haven't shown any code, or what you tried to do, or which HarfBuzz limitations you allude to, it is hard to be more specific. I can only suggest, again, to look at the output of "C-u C-x =" -- that information comes directly from HarfBuzz.