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: 52324@debbugs.gnu.org, info@protesilaos.com
Subject: bug#52324: 29.0.50; "Padded" mode line lacks uniform border
Date: Sat, 11 Dec 2021 15:47:24 +0200	[thread overview]
Message-ID: <837dcbqmmr.fsf@gnu.org> (raw)
In-Reply-To: <83k0gh23ka.fsf@gnu.org> (message from Eli Zaretskii on Mon, 06 Dec 2021 16:47:17 +0200)

> Date: Mon, 06 Dec 2021 16:47:17 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 52324@debbugs.gnu.org
> 
> > From: Protesilaos Stavrou <info@protesilaos.com>
> > Date: Mon, 06 Dec 2021 10:58:02 +0200
> > 
> > In an emacs -Q session with version 27 we could evaluate the following
> > to make the mode line look more spacious ("padded", so to speak):
> > 
> >     (setq x-underline-at-descent-line t)
> > 
> >     (set-face-attribute 'mode-line nil
> >                         :foreground "black"
> >                         :background "gray80"
> >                         :box '(:line-width 6 :color "gray80")
> >                         :overline "gray30"
> >                         :underline "gray30"
> >                         :distant-foreground 'unspecified)
> > 
> > Whereas with master, the same results in a box with interrupted lines.
> 
> This seems to be a general bug regarding display of stretches of
> whitespace with overline and underline.  In Emacs 27, after evaluating
> the above settings, try this:
> 
>    M-: (setq mode-line-format "%b		%p HELLO") RET
> 
> where the whitespace between %b and %p is 2 TAB characters.  you will
> see that the stretch glyph produced for the TABs lacks the overline
> and underline in Emacs 27 as well.
> 
> So this is not a bug introduced by the recent changes in the mode
> line, it is a bug that was always in Emacs, and those recent changes
> just exposed it.
> 
> I'll try to dig into this when I have time.

Lu, can you help?  This has something to do with clipping, because the
overline disappears in this call to x_reset_clip_rectangles at the end
of x_draw_glyph_string:


  /* Reset clipping.  */
  x_reset_clip_rectangles (s->f, s->gc);  <<<<<<<<<<<<<<<<<<<<<<<<<
  s->num_clips = 0;

Before that call, I see the overline and underline of the stretch
glyph on the mode line as expected.  But I cannot understand what is
missing to avoid this removal of the overline and underline.





  parent reply	other threads:[~2021-12-11 13:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06  8:58 bug#52324: 29.0.50; "Padded" mode line lacks uniform border Protesilaos Stavrou
2021-12-06 14:47 ` Eli Zaretskii
2021-12-06 17:13   ` Protesilaos Stavrou
2021-12-11 13:47   ` Eli Zaretskii [this message]
2021-12-12  0:58     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-12  2:48       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-12 12:26       ` Eli Zaretskii
2021-12-12 13:03         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-12 13:12           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-12 13:32             ` Eli Zaretskii
2021-12-12 13:37             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-12 22:20             ` Protesilaos Stavrou
2021-12-13  6:54             ` Protesilaos Stavrou
2021-12-13  7:00               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=837dcbqmmr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=52324@debbugs.gnu.org \
    --cc=info@protesilaos.com \
    --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).