From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Ligature support Date: Fri, 05 Nov 2021 21:11:57 +0200 Message-ID: <83fssact8i.fsf@gnu.org> References: <87cznths5j.fsf@gnus.org> <8ff3b131c53b9df49236@heytings.org> <834k91th5c.fsf@gnu.org> <8ff3b131c5fe09753ca0@heytings.org> <83mtmtru6l.fsf@gnu.org> <8ff3b131c57f741d04e5@heytings.org> <83lf2drqx6.fsf@gnu.org> <87lf2c3k0z.fsf@gnus.org> <83wnlwqocq.fsf@gnu.org> <87wnlwyox9.fsf@gnus.org> <83lf2cq7n5.fsf@gnu.org> <87wnlnkxbo.fsf@gnus.org> <83cznfdohr.fsf@gnu.org> <87zgqik9bk.fsf@gnus.org> <83v916d64z.fsf@gnu.org> <878ry2k6qz.fsf@gnus.org> <83tugqd488.fsf@gnu.org> <87zgqiiq8c.fsf@gnus.org> <83r1bud3or.fsf@gnu.org> <87r1buipf5.fsf@gnus.org> <83o86yd0ig.fsf@gnu.org> <87a6iiimay.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10173"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 05 20:13:25 2021 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 1mj4eS-0002Qa-Im for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 20:13:24 +0100 Original-Received: from localhost ([::1]:37020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mj4eP-0002WX-NY for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 15:13:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj4dP-0001pL-8Y for emacs-devel@gnu.org; Fri, 05 Nov 2021 15:12:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj4dO-0005Ua-Rc; Fri, 05 Nov 2021 15:12:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=TvirB4IKO64McY30tnPLgvIpaQSFv6P43jJXrWW1b/g=; b=gwdEpW3HhKSW 99zVyzXcgA+Lgw+2cXCLS0dLnACpfLGQellMaDmnQr2MAvsa/C00238NMhC0znQ5vIwO3ToOBuAyx ZLQ++RqYRV6CT5qnbhNIQa7sejoQckRtnT/FAMb6Vz7KtlXsQmIWvjjOKwE4dicMxjjRR6E8AFEUL 3loYvBPvBc6voTtX/Tt3ryxlKA6SXjd0QJHH9+NoWWPD6zT+2BVPl93UuMunH51M4crySJFtCjGzv ZEd4lseAq0uXLpw7Xq3ZTJjOrTbwPWhuf4/BnuKAGCe1j98W/4+EjIbW33GK08QfpNhQQR8YnOad/ aBSbIJWyt+slQFetDhoXHg==; Original-Received: from [87.69.77.57] (port=2941 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj4dL-0008Q1-NJ; Fri, 05 Nov 2021 15:12:18 -0400 In-Reply-To: <87a6iiimay.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 05 Nov 2021 17:45:09 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:278799 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Fri, 05 Nov 2021 17:45:09 +0100 > > Eli Zaretskii writes: > > > For example, the mode line can show stuff like "=-", and the font > > could have a ligature for that -- do we really want that ligature on > > the mode line? > > That's a good point. On the other hand, perhaps we want to use a > different font on the mode line when using one of these special fonts. It doesn't matter, because composition-function-table is currently global and doesn't depend on the font. > > Or the font could have a ligature for "ffi" -- do we want a variable > > named "efficient" be displayed with that ligature? I'd be surprised. > > Possibly, but probably not. But I don't think people will choose to use > fonts for programming that have fonts like that. Oh yes, they do. > (Are there even any monospace fonts that have such ligatures?) Yes, definitely. > > Displaying them is easy, just set up composition-function-table > > accordingly (I can show you the code if you cannot figure that out). > > Yes, please -- I've been poking at that, but didn't find the right > incantation. The following should display the ligatures starting with 'f' if the font supports them: (aset composition-function-table ?f '(["f[fhijlt]" 0 font-shape-gstring])) > Well, it's one problem, and I think it's the one that has to be solved > first. See above: there's no problem here that isn't already solved. > For instance, see bug#51385 where they have a weirdo font that maps > "[TRACE]" (and 260 other strings) to different glyphs. We need that > list, because we certainly don't want to be passing "[TRACE]" to > harfbuzz when not using that font. I think we rather need to have a (minor) mode which uses those, and under that mode we do want to pass these strings to HarfBuzz. If the default font doesn't support the corresponding ligatures, we display the literal strings. It is then up to the user to install the right font and tell Emacs to use it (via some face, I guess).