GNU bug report logs -
#61196
30.0.50; X11 rendering of horizontal line in log-edit mode fails with some fonts
Previous Next
Full log
Message #26 received at 61196 <at> debbugs.gnu.org (full text, mbox):
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: dima <at> secretsauce.net, 61196 <at> debbugs.gnu.org
> Date: Wed, 01 Feb 2023 11:42:27 +0800
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> Cc: 61196 <at> debbugs.gnu.org
> >> Date: Wed, 01 Feb 2023 09:29:08 +0800
> >> From: Po Lu via "Bug reports for GNU Emacs,
> >> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >>
> >> When I last investigated this problem (I use the X core font backend all
> >> the time), it was that X fonts typically have no glyph for the newline
> >> character, which Emacs seems to expect.
> >
> > No, Emacs doesn't use the glyph for newline. It starts a new screen
> > line instead. But that requires the default face to have a valid
> > font, AFAIU.
>
> Well, when I made xfont_has_char and xfont_encode_char return a working
> glyph for newline, that started working as expected.
>
> But it's been so long that I've forgotten the details.
Or maybe I'm missing something: I don't really see the problem with
the newline character, I see the same problem with other (ASCII)
characters. And there's this part of gui_produce_glyphs, which is
done before Emacs even considers what kind of character it has to
display:
void
gui_produce_glyphs (struct it *it)
{
int extra_line_spacing = it->extra_line_spacing;
it->glyph_not_available_p = false;
if (it->what == IT_CHARACTER)
{
unsigned char2b;
struct face *face = FACE_FROM_ID (it->f, it->face_id);
struct font *font = face->font;
struct font_metrics *pcm = NULL;
int boff; /* Baseline offset. */
if (font == NULL)
{
/* When no suitable font is found, display this character by
the method specified in the first extra slot of
Vglyphless_char_display. */
Lisp_Object acronym = lookup_glyphless_char_display (-1, it);
eassert (it->what == IT_GLYPHLESS);
produce_glyphless_glyph (it, true,
STRINGP (acronym) ? acronym : Qnil);
goto done;
}
This bug report was last modified 2 years and 138 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.