GNU bug report logs -
#73752
29.4; Ligatures are randomly rendered with extra spaces
Previous Next
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 #248 received at 73752 <at> debbugs.gnu.org (full text, mbox):
[திங்கள் நவம்பர் 04, 2024] Eli Zaretskii wrote:
>> From: Tim Ruffing <dev <at> real-or-random.org>
>> Cc: dev <at> real-or-random.org, xuan <at> xlk.me, 73752 <at> debbugs.gnu.org
>> Date: Mon, 04 Nov 2024 01:11:39 +0100
>>
>> This fixes the problem:
>
> Thanks. But do you understand why?
>
> And how did you arrive to the conclusion that this is the change which
> might help?
>
>> diff --git a/src/ftfont.c b/src/ftfont.c
>> index 882d3eec256..2be443108f1 100644
>> --- a/src/ftfont.c
>> +++ b/src/ftfont.c
>> @@ -2994,9 +2994,8 @@ fthbfont_begin_hb_font (struct font *font, double
>> *position_unit)
>> struct font_info *ftfont_info = (struct font_info *) font;
>>
>> *position_unit = 1.0 / (1 << 6);
>> - if (! ftfont_info->hb_font)
>> - ftfont_info->hb_font
>> - = hb_ft_font_create_referenced (ftfont_info->ft_size->face);
>> + ftfont_info->hb_font
>> + = hb_ft_font_create_referenced (ftfont_info->ft_size->face);
>> return ftfont_info->hb_font;
>> }
>>
>> That is, it makes at least the bug with Yixuan's script disappear. I
>> haven't yet verified if this fixes what I often see during my daily
>> usage.
>
> That code was written by a leading HarfBuzz developer, so it's hard
> for me to believe that it is so incorrect.
>
> OTOH, I see that ftcrhbfont is the _only_ HarfBuzz-based font backend
> which implements the end_hb_font method, and I think you both told me
> that only the Cairo build has this problem? 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.
>
> Visuwesh, do the problems you see also disappear when you install the
> change in fthbfont_begin_hb_font which removes the
> !ftfont_info->hb_font condition for calling
> hb_ft_font_create_referenced?
I cannot seem to reproduce the msialignment with that change either.
Likewise for the change Tim posted further down the thread which changes
ftcrhbfont_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.