unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: 61196@debbugs.gnu.org, dima@secretsauce.net
Subject: bug#61196: 30.0.50; X11 rendering of horizontal line in log-edit mode fails with some fonts
Date: Wed, 01 Feb 2023 14:19:01 +0200	[thread overview]
Message-ID: <83bkmd1sui.fsf@gnu.org> (raw)
In-Reply-To: <87edraxd98.fsf@yahoo.com> (message from Po Lu on Wed, 01 Feb 2023 11:42:27 +0800)

> From: Po Lu <luangruo@yahoo.com>
> Cc: dima@secretsauce.net,  61196@debbugs.gnu.org
> Date: Wed, 01 Feb 2023 11:42:27 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> Cc: 61196@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@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;
	  }





  reply	other threads:[~2023-02-01 12:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31  8:29 bug#61196: 30.0.50; X11 rendering of horizontal line in log-edit mode fails with some fonts Dima Kogan
2023-01-31 17:44 ` Eli Zaretskii
2023-01-31 18:52   ` Dima Kogan
2023-02-01  1:29 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-01  3:37   ` Eli Zaretskii
2023-02-01  3:42     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-01 12:19       ` Eli Zaretskii [this message]
2023-02-01 10:44 ` Gregory Heytings

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=83bkmd1sui.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=61196@debbugs.gnu.org \
    --cc=dima@secretsauce.net \
    --cc=luangruo@yahoo.com \
    /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).