From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 56808@debbugs.gnu.org
Subject: bug#56808: 29.0.50; Elusive display problem on macOS
Date: Fri, 29 Jul 2022 14:32:49 +0200 [thread overview]
Message-ID: <m2a68sayku.fsf@Mini.fritz.box> (raw)
In-Reply-To: <m2tu71xis2.fsf@Mini.fritz.box> ("Gerd Möllmann"'s message of "Thu, 28 Jul 2022 19:13:17 +0200")
Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>> Then how did you get 7 in the other image you posted?
>
> That's the 42€ question.
I can answer that question now. Alas, I don't really have an idea how
to fix this yet. Maybe someone reading this has an idea.
The story starts in the macfont_open. This functions uses
font_build_object to allocate a new struct font. But the allocation
leaves part of the struct members uninitialized! The member space_width
is among the uninitialized members. I can't say that I find that a good
idea. Mistake 1, in my book.
The function macfont_open uses
font->space_width = macfont_glyph_extents (font, glyph, ...)
to compute font->space_width. That would be a good idea, iff
macfont_glyph_extents and/or subroutines wouldn't use font->space_width
themselves. Specifically, in my case with Monaco 12,
macfont_glyph_extents calls
int multiplier = macfont_monospace_width_multiplier (font, fwidth);
and macfont_monospace_width_multiplier uses font->space_width, with that
still being some "random" value. The result of
macfont_monospace_width_multiplier is therefore sometimes 0
(astonishingly often) and sometimes != 0. Mistake 2.
When the result is not 0, macfont_glyph_extents does its own thing with
the unitialized font->space_width. Mistake 3.
And so on. I stopped debugging here.
Mabe I should initialize font->space_width to -3. With -2, it always
fails. ;-).
next prev parent reply other threads:[~2022-07-29 12:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 5:09 bug#56808: 29.0.50; Elusive display problem on macOS Gerd Möllmann
2022-07-28 6:04 ` Eli Zaretskii
2022-07-28 7:37 ` Gerd Möllmann
2022-07-28 8:01 ` Eli Zaretskii
2022-07-28 9:18 ` Gerd Möllmann
2022-07-28 11:31 ` Gerd Möllmann
2022-07-28 12:07 ` Gerd Möllmann
2022-07-28 13:03 ` Gerd Möllmann
2022-07-28 13:37 ` Eli Zaretskii
2022-07-28 15:04 ` Gerd Möllmann
2022-07-28 15:12 ` Eli Zaretskii
2022-07-28 17:13 ` Gerd Möllmann
2022-07-29 12:32 ` Gerd Möllmann [this message]
2022-07-29 13:52 ` YAMAMOTO Mitsuharu
2022-07-29 14:32 ` Gerd Möllmann
2022-07-30 7:49 ` YAMAMOTO Mitsuharu
2022-07-30 7:54 ` Gerd Möllmann
2022-07-30 8:13 ` Eli Zaretskii
2022-07-30 8:28 ` YAMAMOTO Mitsuharu
2022-07-29 13:17 ` Alexander Adolf
2022-07-29 14:18 ` Gerd Möllmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2a68sayku.fsf@Mini.fritz.box \
--to=gerd.moellmann@gmail.com \
--cc=56808@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).