[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43506: 26.1; line-height sometimes has no effect on the line height
From: |
Eli Zaretskii |
Subject: |
bug#43506: 26.1; line-height sometimes has no effect on the line height |
Date: |
Sat, 19 Sep 2020 14:43:26 +0300 |
> Date: Sat, 19 Sep 2020 14:06:08 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 43506@debbugs.gnu.org
>
> > From: Markus Triska <triska@metalevel.at>
> > Cc: 43506@debbugs.gnu.org
> > Date: Sat, 19 Sep 2020 12:07:24 +0200
> >
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> > > There are several ways to explicitly specify a larger line height,
> > > either by specifying an absolute height for the display line, or by
> > > specifying vertical space. However, no matter what you specify, the
> > > actual line height can never be less than the default.
> >
> > I find that this is not the case: For example, if I change "3" to "t" in
> > the snippet I posted, then I get "0" in the minibuffer, indicating that
> > the line height can become as low as 0 by using this property.
>
> The value t is not a valid value for the line-height property. So you
> are invoking "unspecified behavior" here by using it.
Sorry, my bad. The value of t _is_ valid, as documented in the ELisp
manual:
If the property value is ‘t’, the newline character has no effect on
the displayed height of the line—the visible contents alone determine
the height. The ‘line-spacing’ property, described below, is also
ignored in this case. This is useful for tiling small images (or image
slices) without adding blank areas between the images.
This feature is indeed used in image.el, which see.
So the value of t indeed can cause an empty line to appear to have a
zero pixel-height, but such an empty line cannot display anything, and
the cursor on that line will have its normal default height. The use
case for using this value is as described above, and does not make
sense for empty lines.
All other values of this property cannot make the line's height
smaller, as documented.
The conclusion is as before: an integer value of the 'line-height'
property cannot make the line's height on display smaller than the
default height.