GNU bug report logs - #54646
29.0.50; set-fontset-font and font clipping issues

Previous Next

Package: emacs;

Reported by: Visuwesh <visuweshm <at> gmail.com>

Date: Thu, 31 Mar 2022 03:38:01 UTC

Severity: normal

Merged with 73752

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


View this message in rfc822 format

From: Visuwesh <visuweshm <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rpluim <at> gmail.com, 54646 <at> debbugs.gnu.org
Subject: bug#54646: 29.0.50; set-fontset-font and font clipping issues
Date: Fri, 01 Apr 2022 18:40:30 +0530
[வெள்ளி ஏப்ரல் 01, 2022] Eli Zaretskii wrote:

>> From: Visuwesh <visuweshm <at> gmail.com>
>> Cc: Robert Pluim <rpluim <at> gmail.com>,  54646 <at> debbugs.gnu.org
>> Date: Fri, 01 Apr 2022 17:08:59 +0530
>> 
>> > I think at this point we need to establish whether we pass the same
>> > information to HarfBuzz in the "good" and the "bad" cases.  In
>> > particular, we tell it how to scale the glyph metrics:
>> >
>> >   hb_font_t *hb_font
>> >     = font->driver->begin_hb_font
>> >     ? font->driver->begin_hb_font (font, &position_unit)
>> >     : NULL;
>> >
>> > The value of position_unit then affects the values returned in the
>> > Lisp glyph object used to display the grapheme cluster:
>> >
>> >       xoff = lround (pos[i].x_offset * position_unit);
>> >       yoff = - lround (pos[i].y_offset * position_unit);
>> >       wadjust = lround (pos[i].x_advance * position_unit);
>> >       if (xoff || yoff || wadjust != metrics.width)
>> > 	LGLYPH_SET_ADJUSTMENT (lglyph, CALLN (Fvector,
>> > 					      make_fixnum (xoff),
>> > 					      make_fixnum (yoff),
>> > 					      make_fixnum (wadjust)));
>> >
>> > I'd be interested in what happens there in the "good" vs the "bad"
>> > cases.
>> >
>> > If we pass the same information to HarfBuzz, and it returns different
>> > results, then it's probably a problem in HarfBuzz.
>> 
>> If you can give some instructions on how to get started, I can try
>> getting the value of position_unit in the good and the bad cases.
>
> I don't think I understand where to begin the instructions.  Are you
> familiar with running Emacs under GDB and debugging the C code?  

Unfortunately not, but the printf option sounds feasible.  So I will do
that.

> If so, setting a breakpoint in the code which I quoted (it's in
> hbfont.c) and showing the values in both the "good" and the "bad"
> cases is what we need.
>

I get two matches for the first snippet: in hbfont_shape and in
hbfont_otf_capability.  I assume I have to check the one in
hbfont_shape?

> Alternatively, you could add printf statements in that code which
> would output those values to stdout or stderr streams.




This bug report was last modified 253 days ago.

Previous Next


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