Subject: bug#76390: [PATCH] Center lines vertically with line-spacing-vertical-center

From: Eli Zaretskii <[email-masked]>
Date: Tue, 18 Feb 2025 19:02:02 +0200

> From: Daniel Mendler <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Tue, 18 Feb 2025 16:40:15 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > And finally, I have a question: what does this patch do with a line
> > that mixes different fonts, especially fonts with very different
> > values of ascent and descent?  Does the result look well?  ISTR that
> > we need to handle the underline property specially due to these
> > considerations, so as to avoid producing broken underline.
> 
> I cannot tell yet. I can answer that when I worked a little bit on the
> patch. All I can say confidently is that the status quo with the
> non-centered line-spacing does not look good, not even with a single
> font (see my hi-lock example from above).

"Good" in that case is in the eyes of the beholder, because the added
spacing is uniform whatever the font.  You say "not good" because I'm
guessing you don't like the effect in general, not because it breaks
when different fonts are used on the same screen line.

> I am sure that we can do better in all cases; with a single font or
> with multiple fonts of different height.

The problem is that if we need to do something with different fonts,
it might be impossible to do that in the place in code where the patch
makes the changes.  Cf what we do with the underline property.