GNU bug report logs - #73752
29.4; Ligatures are randomly rendered with extra spaces

Previous Next

Package: emacs;

Reported by: xuan <at> xlk.me

Date: Fri, 11 Oct 2024 21:40:02 UTC

Severity: normal

Merged with 54646

Found in versions 29.0.50, 29.4

Fixed in version 30.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #242 received at 73752 <at> debbugs.gnu.org (full text, mbox):

From: Tim Ruffing <dev <at> real-or-random.org>
To: Tim Ruffing <dev <at> real-or-random.org>, Eli Zaretskii <eliz <at> gnu.org>, 
 YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Cc: 73752 <at> debbugs.gnu.org, xuan <at> xlk.me, visuweshm <at> gmail.com
Subject: Re: bug#73752: 29.4; Ligatures are randomly rendered with extra spaces
Date: Wed, 06 Nov 2024 13:02:34 +0100
> > 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.
> 
> 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().
> 


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 = (struct font_info *) font;
   cairo_scaled_font_t *scaled_font = ftcrfont_info->cr_scaled_font;
 
-  cairo_ft_scaled_font_unlock_face (scaled_font);
   ftcrfont_info->ft_size = NULL;
 }

This is consistent with your theory about end_hb_font.







This bug report was last modified 252 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.