GNU bug report logs - #76390
[PATCH] Center lines vertically with line-spacing-vertical-center

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Tue, 18 Feb 2025 10:43:02 UTC

Severity: wishlist

Tags: patch

Full log


Message #14 received at 76390 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: 76390 <at> debbugs.gnu.org, stefankangas <at> gmail.com
Subject: Re: bug#76390: [PATCH] Center lines vertically with
 line-spacing-vertical-center
Date: Tue, 18 Feb 2025 19:02:02 +0200
> From: Daniel Mendler <mail <at> daniel-mendler.de>
> Cc: 76390 <at> debbugs.gnu.org,  stefankangas <at> gmail.com
> Date: Tue, 18 Feb 2025 16:40:15 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> 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.





This bug report was last modified 115 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.