all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: jessenzr@gmail.com, email@johnmuhl.me, emacs-devel@gnu.org
Subject: Re: Patch to vertically center line content when using line-spacing variable
Date: Mon, 26 Apr 2021 15:35:22 +0300	[thread overview]
Message-ID: <83k0opjkad.fsf@gnu.org> (raw)
In-Reply-To: <87sg3ei23u.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun,  25 Apr 2021 21:41:09 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 25 Apr 2021 21:41:09 +0200
> Cc: jessenzr@gmail.com, emacs-devel@gnu.org
> 
> I've included the patch below.
> 
> I've never used the `line-spacing' variable myself (and my guess is that
> few do, which is probably why your message didn't get any responses),
> but I did a
> 
>   (setq line-spacing 20)
> 
> now, and I see that this puts more space at the bottom of the line.  The
> proposed patch allows centring instead, which seems eminently reasonable
> to me.  (Perhaps this should even be the default?)
> 
> Does anybody have any comments here before I apply the patch?

I have a few comments, some (most) of them were already voiced, either
in this discussion or in the past ones on the same theme:

 . I don't see a need for a separate new variable (and a built-in one
   on top of that).  I think it is cleaner to extend the line-spacing
   property, parameter and variables to support a cons of two numbers,
   (ABOVE . TOTAL), which would allow users and Lisp programs to
   specify how to subdivide the spacing between the ascent and descent
   parts.  This would then also solve the problem with the proposed
   change, whereby the vertical position of the text inside the
   spacing can only be controlled per buffer, but not on every level
   where the line-spacing is supported
 . The code misses one other place where line-spacing takes effect,
   see the function append_space_for_newline.
 . The division between ascent and descent in the patch loses 1 pixel
   if the value of line-spacing is an odd number of pixels, so the
   code needs to be fixed not to do that.

Thanks.



  parent reply	other threads:[~2021-04-26 12:35 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 20:24 Patch to vertically center line content when using line-spacing variable email
2021-04-25 19:41 ` Lars Ingebrigtsen
2021-04-25 20:15   ` john muhl
2021-04-25 20:21   ` Eli Zaretskii
2021-04-25 23:25     ` Fu Yuan
2021-04-25 23:28   ` Stefan Kangas
2021-04-25 23:56     ` Clément Pit-Claudel
2021-04-26  1:00       ` Stefan Kangas
2021-04-26 14:00         ` Clément Pit-Claudel
2021-04-25 23:56   ` Clément Pit-Claudel
2021-04-26 12:35   ` Eli Zaretskii [this message]
2021-04-26 20:04     ` Lars Ingebrigtsen
  -- strict thread matches above, loose matches on Subject: below --
2020-01-23 16:32 조성빈
2020-01-23 19:22 ` Eli Zaretskii
2020-02-07 17:06   ` Jesse Medeiros
2020-02-07 18:26     ` Eli Zaretskii
2020-04-05 18:55     ` 조성빈 via "Emacs development discussions.
2020-04-06 21:13       ` Jesse Medeiros
2020-04-07 14:17         ` Eli Zaretskii
2019-08-31 21:53 Jesse Medeiros
2019-08-31 22:36 ` Stefan Kangas
2019-09-01  0:01   ` Jesse Medeiros
2019-09-03  0:01     ` Jesse Medeiros
2019-09-07  9:50     ` Eli Zaretskii
2019-09-08 23:24       ` Jesse Medeiros
2019-09-09  7:39         ` martin rudalics
2019-09-09  8:40         ` Robert Pluim
2019-09-12 12:08           ` Jesse Medeiros
2019-09-12 14:26             ` Robert Pluim
2019-09-12 20:49               ` Jesse Medeiros
2019-09-13  9:35                 ` Robert Pluim
2019-09-29 23:54           ` Jesse Medeiros
2019-09-30  7:07             ` Robert Pluim

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83k0opjkad.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=email@johnmuhl.me \
    --cc=jessenzr@gmail.com \
    --cc=larsi@gnus.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.