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 (was: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY)) Date: Fri, 22 May 2020 16:15:42 +0300 Message-ID: <83ftbs2jr5.fsf@gnu.org> References: <20200517165953.000044d2@web.de> <83lflqblp0.fsf@gnu.org> <83ftbybio3.fsf@gnu.org> <83zha69xs2.fsf@gnu.org> <83367x9qeq.fsf@gnu.org> <0ccae2a4-533b-d15c-2884-c2f00b067776@gmail.com> <83wo5987mk.fsf@gnu.org> <99d4beed-88ae-b5cd-3ecb-a44325c8a1dc@gmail.com> <20200518215908.GA57594@breton.holly.idiocy.org> <83mu6481v3.fsf@gnu.org> <75a90563-51b4-d3b8-4832-fc0e2542af0d@gmail.com> <83blmi7hys.fsf@gnu.org> <837dx55qff.fsf@gnu.org> <834ks95cmz.fsf@gnu.org> <4faa291f-f2df-36d1-73d5-332b93a9b6d8@gmail.com> <83wo544hx5.fsf@gnu.org> <831rnc43ih.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="50743"; mail-complaints-to="usenet@ciao.gmane.io" Cc: cpitclaudel@gmail.com, alan@idiocy.org, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 22 15:16:13 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 1jc7X1-000D52-Th for ged-emacs-devel@m.gmane-mx.org; Fri, 22 May 2020 15:16:11 +0200 Original-Received: from localhost ([::1]:36752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc7X0-0006Rl-WC for ged-emacs-devel@m.gmane-mx.org; Fri, 22 May 2020 09:16:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc7WX-00062R-Fh for emacs-devel@gnu.org; Fri, 22 May 2020 09:15:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48080) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc7WW-00044c-4J; Fri, 22 May 2020 09:15:40 -0400 Original-Received: from [176.228.60.248] (port=4775 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jc7WV-0006Nu-GE; Fri, 22 May 2020 09:15:39 -0400 In-Reply-To: (message from Pip Cet on Fri, 22 May 2020 12:52:41 +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:251222 Archived-At: > From: Pip Cet > Date: Fri, 22 May 2020 12:52:41 +0000 > Cc: cpitclaudel@gmail.com, alan@idiocy.org, emacs-devel@gnu.org > > > You can request all the ligatures that _can_ be supported; > > How do I do that? Opentype fonts can support arbitrary ligatures, such > as "Zapfino" being a seven-letter ligature. I thought the set of all the ligatures is known, and guided by typography experts. Do font designers really support ligatures from any arbitrary combination of characters? If so, where can I read about this? > > Or you can request only those ligatures that make sense for the > > particular use case. > > My use case is English text, and all ligatures supported by the font > make sense for that. Which ones are those? Is there an exhaustive list of such ligatures somewhere? > > For example, when displaying program source code > > you'd probably want the various symbols, like -> etc., to produce > > ligatures, but you most probably won't want "ffi" in a variable name > > to produce a ligature. > > Why not? It makes no sense to me. Why ligate them in that use case? Program source code isn't supposed to behave like typeset human-readable text. > Okay, I can accept that requirement. But it should be possible to get > "all ligatures", rather than a finite set you know about in advance. Let's first reach an understanding of what "all ligatures" actually means. I thought the full list of all ligatures is known in advanced and quite small, but maybe this is wrong, see above. > "For the list of typographical ligatures, see > > https://en.wikipedia.org/wiki/Orthographic_ligature#Ligatures_in_Unicode_(Latin_alphabets)" > > That's very wrong: typographical ligatures generally aren't assigned > Unicode codepoints; those that have them usually do so for historical > reasons. Indeed, ligatures don't have to have Unicode codepoints, only some of them are precomposed. Emacs doesn't need them to have codepoints when we use auto-composition-mode. The reference is there only to show the list of ligatures, and I believe the list is full regardless of the codepoint issue. Can you point me to a larger list of ligatures made out of ASCII letters? > There's no finite "the" list of typographical ligatures, it's up to > each font to define glyphs covering codepoint clusters as it sees > fit. Really? Any reference for this? > > At least I didn't yet see any evidence that it isn't valid; > > But how do I make it work? For English/Western text with ligatures > that I don't know about in advance? Please treat this as a dumb > end-user question. What lines of Lisp do I enter to get all the > ligatures my font supports, most of which do not have individual > Unicode codepoints? You tell Emacs that a given series of characters should be composed, via composition-function-table, and the shaper then does the job of providing the font glyphs for displaying that sequence. But I don't think we should continue with these details before we have a clear idea of whether the list of possible ligatures is really infinite, as you seem to imply.