From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Ruffing Newsgroups: gmane.emacs.bugs Subject: bug#73752: 29.4; Ligatures are randomly rendered with extra spaces Date: Wed, 06 Nov 2024 13:02:34 +0100 Message-ID: References: <8f02b0490d2abb0889b760fb80c3ec492c63c784.camel@timruffing.de> <86ed3x4h7m.fsf@gnu.org> <86cyjh4dx5.fsf@gnu.org> <68b51105125b6c7a34ec8c2032588ce72d8557bc.camel@timruffing.de> <86wmho38y3.fsf@gnu.org> <861pzu28bz.fsf@gnu.org> <79a634db4f76e482038539722aab18fbf10a9251.camel@timruffing.de> <86msiiync2.fsf@gnu.org> <87bjyxyl64.fsf@gmail.com> <86ses9yh3j.fsf@gnu.org> <8734k9ydb4.fsf@gmail.com> <86ikt5y44p.fsf@gnu.org> <87y121wor7.fsf@gmail.com> <86ed3ty2pe.fsf@gnu.org> <87ttcpwnie.fsf@gmail.com> <86cyjdy1xb.fsf@gnu.org> <87plndwn4z.fsf@gmail.com> <86a5ehy1hc.fsf@gnu.org> <87ldy1wmg9.fsf@gmail.com> <87h68pwm2a.fsf@gmail.com> <868qu1xzhb.fsf@gnu.org> <86y11yuc3x.fsf@gnu.org> <0ac0e3316c0b16e645387450bd48c60b291391eb.camel@timruffing.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20976"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73752@debbugs.gnu.org, xuan@xlk.me, visuweshm@gmail.com To: Tim Ruffing , Eli Zaretskii , YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 06 13:04:35 2024 Return-path: Envelope-to: geb-bug-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 1t8em2-0005L1-Gq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Nov 2024 13:04:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8elb-0004CJ-01; Wed, 06 Nov 2024 07:04:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8elW-0004Ba-Ko for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 07:04:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8elW-0006UD-98 for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 07:04:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=rnRrVzNUxxkaylAiWTY1G+EPIprJgMOg1JYTlnWbg/Q=; b=tKMFsu8G7FTFlqgbUSoNhUsrz66CzKoWDEB0y5q6/nos5NmlueqzOc26JpYMjzT7Fg+z8SBKs5OQ2dqf9s+nwo0IcHcnIKGnQ7GJ2pNfrhtRPXzD74ZYpSWR5+JtbMDaVNEjT9Z98KdQkrFSe31AqKBkwcZY3ebfLeLRj/wEMk85smgm9tBrf0ESJI2Sk3kW6ewnuSaHs6UKFX6cpJMS8XSBBHrbS3C+d8XttvT535Kd/JVA0N4Qorc8WcGyHWl2Li+hRsKXmaLafZAc6BrlU+NanCFq8pZUgmmtTwBouH6jBw4n+k+WZvJBHEsPGmP0jdyZNl50vJp4AkfopMJh3A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t8elV-0003sf-TW for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 07:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tim Ruffing Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Nov 2024 12:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73752 X-GNU-PR-Package: emacs Original-Received: via spool by 73752-submit@debbugs.gnu.org id=B73752.173089459714868 (code B ref 73752); Wed, 06 Nov 2024 12:04:01 +0000 Original-Received: (at 73752) by debbugs.gnu.org; 6 Nov 2024 12:03:17 +0000 Original-Received: from localhost ([127.0.0.1]:39896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8ekn-0003rj-0H for submit@debbugs.gnu.org; Wed, 06 Nov 2024 07:03:17 -0500 Original-Received: from mout-p-101.mailbox.org ([80.241.56.151]:40216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8ekl-0003rY-LW for 73752@debbugs.gnu.org; Wed, 06 Nov 2024 07:03:16 -0500 Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Xk3jp0MXCz9sy3; Wed, 6 Nov 2024 13:02:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=real-or-random.org; s=MBO0001; t=1730894558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rnRrVzNUxxkaylAiWTY1G+EPIprJgMOg1JYTlnWbg/Q=; b=m84v/watPIb8Gm6aKwreLtqN+gaY3J2woFsAKNICMzMPu5gkVs3uJcmDz5RqKjcZZXz9tN uBVzWXmz3xSV/6XEXgM4KxeEValbgnfr1I7/HOUZ+UZeLtPphbvGDoTALl5JQ1ZgAbKBbm lAzn24piVyPPZsmLL+8HxPPFnwc3T/Cyj+HXQDxFqeLb1/JBa1fm7Tq0e9nGhGFyUVucFr lkfqqso84apQakd5pVBIuFW5I4WAXr+LsXXN7+SGzXk3rpuuagBKJI5h2ZTL6ktiKXHr7I 9SZIKXR29r9wBGd7ivF8TJcMw7md+am2re9I47LAdMEsLMX9RfgSUWZA3Q174g== In-Reply-To: <0ac0e3316c0b16e645387450bd48c60b291391eb.camel@timruffing.de> X-Rspamd-Queue-Id: 4Xk3jp0MXCz9sy3 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294948 Archived-At: > > If so, I think the code > > to look at is the end_hb_font method and what it does to the > hb_font > > object. The end_hb_font method is called each time the shaper is > > called, so whatever it does to the hb_font object is inherited by > the > > next call to the shaper. >=20 > This sounds like a plausible cause, but as far as I can tell, > end_hb_font doesn't do anything to hb_font. The end function is > simply > necessary to call cairo_ft_scaled_font_unlock_face(). >=20 Okay, I still have no idea what the root cause is, but this hack also makes the bug disappear for me: diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 3700154e44a..4f62873f8c1 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -708,7 +708,6 @@ ftcrhbfont_end_hb_font (struct font *font, hb_font_t *hb_font) struct font_info *ftcrfont_info =3D (struct font_info *) font; cairo_scaled_font_t *scaled_font =3D ftcrfont_info->cr_scaled_font; =20 - cairo_ft_scaled_font_unlock_face (scaled_font); ftcrfont_info->ft_size =3D NULL; } This is consistent with your theory about end_hb_font.