From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Emacs 28: Specific TTF font gets loaded with font-backend x instead of ftcrhb Date: Fri, 07 Feb 2020 11:41:57 +0100 Message-ID: <87lfpe65my.fsf@gnu.org> References: <87pneu1u9e.fsf@gnu.org> <83mu9ygyi7.fsf@gnu.org> <87imkmi46d.fsf@gnu.org> <83eevagoh8.fsf@gnu.org> <878slh0yr8.fsf@gnu.org> <83y2thezjq.fsf@gnu.org> <87v9okyyt5.fsf@gnu.org> <83pnerfuq1.fsf@gnu.org> <835zgig231.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="36184"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 07 11:42:26 2020 Return-path: Envelope-to: geh-help-gnu-emacs@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 1j015e-0009Gr-AW for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 07 Feb 2020 11:42:26 +0100 Original-Received: from localhost ([::1]:53768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j015d-0000nT-Ch for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 07 Feb 2020 05:42:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51879) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j015E-0000n8-V4 for help-gnu-emacs@gnu.org; Fri, 07 Feb 2020 05:42:02 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j015E-0006fJ-Pl for help-gnu-emacs@gnu.org; Fri, 07 Feb 2020 05:42:00 -0500 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:47779) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1j015E-0000pZ-4h; Fri, 07 Feb 2020 05:42:00 -0500 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 9220E2206E; Fri, 7 Feb 2020 05:41:59 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Fri, 07 Feb 2020 05:41:59 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrheehgddukecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufhffjgfkfgggtgesmhdtreertdertdenucfhrhhomhepvfgrshhsihhl ohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucffohhmrghinhepfihikhhiph gvughirgdrohhrghenucfkphepleefrddvfeeirddufeejrdduieefnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmth hprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdelkedqthhs ughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: from thinkpad-t440p (p5dec89a3.dip0.t-ipconnect.de [93.236.137.163]) by mail.messagingengine.com (Postfix) with ESMTPA id D768730606E9; Fri, 7 Feb 2020 05:41:58 -0500 (EST) In-Reply-To: <835zgig231.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 07 Feb 2020 11:48:34 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122365 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> I'm pretty sure I had built with HarfBuzz but tried again anyway. >> This time it worked just fine. I'll attach a screenshot showing two >> emacs frames with ligatures in action. The left one is with the >> JetBrains Mono font, the right one is with the PragmataPro Liga font. > > So the conclusion is that this works with both fonts? (I cannot be > sure because the two displays look somewhat differently). I'd say, yes. There are some slight differences in which ligatures those two fonts support, of course. >> > Not exactly. In Emacs built with HarfBuzz, you will see the >> > original ASCII characters displayed, but handled as a single >> > grapheme cluster, i.e. the cursor will be "widened" to include all >> > of them, and a single C-f will move across all of them. >> >> That doesn't seem to happen. forward-char moves inside ligature >> sequences no matter if the font has a ligature or not. I.e., even >> with a ligature ~= which gets composed to an equal sign with curvy >> upper line point move half-by-half. > > I think that's because you use font-shape-gstring directly. You > should use compose-gstring-for-graphic instead. Ah, then it works as you've described. I actually like this behavior. >> > Burt if you only care about ligatures in programming languages, the >> > job becomes much simpler, I think. Although I'd still expect the >> > ligatures in effect to depend on the programming language of the >> > current buffer. >> >> Right now I've just enabled anything. > > Not really everything, IMO, as there are also ligatures relevant only > to human-readable text. For example, see this URL: > > https://en.wikipedia.org/wiki/Orthographic_ligature#Ligatures_in_Unicode_(Latin_alphabets) Yes, right. I meant "all that I've listed" which are just those I could copy & paste from the JetBrains Mono homepage and those are basically just the typical programming ligatures. >> But one thing which comes to mind is that one might want to suppress >> ligature composition inside strings... > > Which probably means we'd need some text property to disable > composition there. Yes, something like that. >> > Which means composition-function-table needs to be buffer-local, >> > and we should make sure making it buffer-local does TRT. >> >> This doesn't seem to work right now. See the FIXME at the bottom of >> below code. > > We need to fix that. We do have buffer-local char-tables, for example > buffer-display-table. We should probably define a buffer-local > composition-function-table in the same way, and have a global table as > its parent or something (for language-specific compositions, like > those for accented letters). Sounds about right. By the way, if I enable ligatures, I get reproducible infloops or something alike. The visual bell starts ringing/blinking, C-g won't help, and even with debug-on-{error,quit} I'm unable to get into the debugger. I can reproduce that simply by starting Gnus and trying to enter a group but I got that also once with pushing my commits in Magit and sometimes when quitting emacs with C-x C-c. Attached is a GDB backtrace. --=-=-= Content-Type: application/gzip Content-Disposition: attachment; filename=gdb.log.gz Content-Transfer-Encoding: base64 H4sICOw7PV4AA2dkYi5sb2cA1VxrbyO5lf3uX1GwP7SNdNt8P3rHnSDvASa7g+2ZTYDxQGBVsSyl JZVSVfLYO8h/38vSsy5p2eVNgMSA3BZ5SF6e++Bl6ao/d67pZsv7bNXU941bfMxupvXCw69mefPf flW3N35+4xeuaG/aptj8lZ398N208a7MSp+v7+/D+HUbfs9nedf3TMo880uXz33549n3fd+0brsh AN40rnnKzm/WbXMD726Ou6/b+pqeX5/tO6+vb9qpa/zNfVF8sNfsmtysnrppvQy9bVcWj483D+rm ceGhsWyvV08fNacfs89Py849/tk1SxDjI6wKcsyW5azwbbZYw5vcw/vO3/umzeoma+eh6322rLus 7Zr/yFa+mbpVmz3V62wxa1tfZi4r6sXC/fIsyxpfFfV62bXZbfbDu8mfJruGdz/2b1ezdz+e/fCf /qdsSxp51BX8MKqUJiS7/ObP32ZKCqmvkjhqGR/gTBpHckMHOBtwv/WdK6aBf1d1vskeqrr5klVN vcigeV4GxcNu2zBCkbED6NgBbOwAOXaAGjlAj920HrtpPXbTmo8dIMYOGEurHk2rHjvAjB1gRw4w YzVtxmrajNW0GatpM1bTZqymzVhNm7GaNmM1bceuYEevMNKWJBlpS5KMtCVJRtq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