Subject: Re: bug#67563: 30.0.50; Box should not extend with line-spacing

From: Eli Zaretskii <[email-masked]>
Date: Sat, 02 Dec 2023 16:06:54 +0200

> From: Yuan Fu <[email-masked]>
> Date: Thu, 30 Nov 2023 23:47:37 -0800
> 
> If I set a box face for a button, and then set a line-space for the buffer, I expect the extra space between lines to be added outside of the box, like so:
> 
> +-------------------------+
> |          Box            |
> |                         |
> +-------------------------+
>        extra line space
> +-------------------------+
> |          Box            |
> |                         |
> +-------------------------+
> 
> However, right now, the bottom line of the box includes the extra line spacing, like so:
> 
> +-------------------------+
> |          Box            |
> |                         |
> +                         +
> |      extra line space   |
> +-------------------------+
> +-------------------------+
> |          Box            |
> |                         |
> +-------------------------+
> 
> Screenshot:
> 
> Ideally there should be some space between the two buttons on the two lines. Also notice the extra space above the bottom line of the box.
> 
> I also attached a repo file to produce these buttons.
> 
> If someone can give me some pointers, I can try to look into this.

We currently draw the box such that its height is equal to the height
of the screen line, and that includes line-spacing.

The implementation is in x_draw_glyph_string_box and similar functions
in other GUI backends (w32_draw_glyph_string_box etc.).

If you want to ad a feature where the box excludes line-space, please
make it optional, by default off, as the current behavior is a very
old one.