Subject: Re: bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text

From: Aaron Jensen <[email-masked]>
Date: Wed, 21 Feb 2018 08:17:34 -0800

On Wed, Feb 21, 2018 at 5:47 AM, Alp Aker <[email-masked]> wrote:
> On Wed, Feb 21, 2018 at 1:03 AM, Aaron Jensen <[email-masked]> wrote:
> Something like that should already be possible.  Underline placement is
> determined by the following rules, considered in this order:
>
> 1. If x-underline-at-descent-line is non-nil, underline at the descent line,
> where the descent line is the bottom of the current glyph row, inclusive of
> extra line spacing.

I'm specifically talking about this rule. I am suggesting that this
change to not include the extra line spacing. Typographically, I
cannot think of a good reason to include the extra line spacing. It
ends up putting the underline above the next line effectively, which
looks terrible (see my original screenshots). Given that rule #3 you
mention below uses half the descent, it seems like the full descent +
1px could be used for this, which would put the underline in a
sensible place (probably the place it is today when line-spacing is
nil).

> 2. If x-use-underline-position-properties is non-nil and the font has
> underline
> position info, use that.
>
> 3. If the current font can be determined, use half of the font's descent,
> "descent" here meaning the maximum amount by which a character from the font
> descends below the baseline.
>
> 4. Otherwise, use the default offset (1 point).
>
> The only one of these possibilities that should be affected a change in line
> spacing is 1.  Is that not what you see?
>