Subject: Re: bug#56808: 29.0.50; Elusive display problem on macOS

From: Gerd Möllmann <[email-masked]>
Date: Thu, 28 Jul 2022 14:07:09 +0200

Gerd Möllmann <[email-masked]> writes:

> This is the font of the default face in both cases...

And space-width seems to come from nsfont.m:2696, which I found with
LSP/find references:

  glyph = macfont_get_glyph_for_character (font, ' ');
  if (glyph != kCGFontIndexInvalid)
    font->space_width = macfont_glyph_extents (font, glyph, NULL, NULL, 0);
  else
    /* dirty workaround */
    font->space_width = pixel_size;

I don't think the else branch has been taken, because that wouldn't lead
to a value of 8.

Suspiciously, the last argument of macfont_glyph_extents is 0 (false),
and the parameter is named force_integral_p.  Hm, space_width is an
integer?

But, I'm afraid I'm out here.  I don't understand these functions at
all.

BTW, a clear-font-cache didn't help, and yes, I don't know what it does
:-).