Clarify documentation of 'line-spacing' and 'line-height'

* doc/lispref/display.texi (Line Height): Clarify how the line
height is determined via variables and text properties.  (Bug#23806)
This commit is contained in:
Eli Zaretskii 2016-06-21 17:20:09 +03:00
parent 5f37572321
commit 4793f5fc41

View file

@ -1996,15 +1996,17 @@ newline.
If the property value is @code{t}, the newline character has no If the property value is @code{t}, the newline character has no
effect on the displayed height of the line---the visible contents effect on the displayed height of the line---the visible contents
alone determine the height. This is useful for tiling small images alone determine the height. The @code{line-spacing} property,
(or image slices) without adding blank areas between the images. 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.
If the property value is a list of the form @code{(@var{height} If the property value is a list of the form @code{(@var{height}
@var{total})}, that adds extra space @emph{below} the display line. @var{total})}, that adds extra space @emph{below} the display line.
First Emacs uses @var{height} as a height spec to control extra space First Emacs uses @var{height} as a height spec to control extra space
@emph{above} the line; then it adds enough space @emph{below} the line @emph{above} the line; then it adds enough space @emph{below} the line
to bring the total line height up to @var{total}. In this case, the to bring the total line height up to @var{total}. In this case, any
other ways to specify the line spacing are ignored. value of @code{line-spacing} property for the newline is ignored.
@cindex height spec @cindex height spec
Any other kind of property value is a height spec, which translates Any other kind of property value is a height spec, which translates
@ -2054,9 +2056,10 @@ overrides line spacings specified for the frame.
@kindex line-spacing @r{(text property)} @kindex line-spacing @r{(text property)}
Finally, a newline can have a @code{line-spacing} text or overlay Finally, a newline can have a @code{line-spacing} text or overlay
property that overrides the default frame line spacing and the buffer property that can enlarge the default frame line spacing and the
local @code{line-spacing} variable, for the display line ending in buffer local @code{line-spacing} variable: if its value is larger than
that newline. the buffer or frame defaults, that larger value is used instead, for
the display line ending in that newline.
One way or another, these mechanisms specify a Lisp value for the One way or another, these mechanisms specify a Lisp value for the
spacing of each line. The value is a height spec, and it translates spacing of each line. The value is a height spec, and it translates