aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-12-11 23:18:15 +0000
committerRichard M. Stallman2004-12-11 23:18:15 +0000
commit9eb8959aaad86b30ab55f74a8d2a2651c41ee7a3 (patch)
treec98576a6303b9f25dce67ba1ff7c60c435a03531
parent6f8ffb88696242427b77a0b1e95f10241dfe47d5 (diff)
downloademacs-9eb8959aaad86b30ab55f74a8d2a2651c41ee7a3.tar.gz
emacs-9eb8959aaad86b30ab55f74a8d2a2651c41ee7a3.zip
(Line Height): Rewrite text for clarity.
-rw-r--r--lispref/ChangeLog4
-rw-r--r--lispref/display.texi87
2 files changed, 54 insertions, 37 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index a474f828ae4..6944d2af6c5 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,7 @@
12004-12-11 Richard M. Stallman <rms@gnu.org>
2
3 * display.texi (Line Height): Rewrite text for clarity.
4
12004-12-11 Kim F. Storm <storm@cua.dk> 52004-12-11 Kim F. Storm <storm@cua.dk>
2 6
3 * display.texi (Display): Add node "Line Height" to menu. 7 * display.texi (Display): Add node "Line Height" to menu.
diff --git a/lispref/display.texi b/lispref/display.texi
index 1c9c8bdd820..04d478b9b2a 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -1525,70 +1525,83 @@ including the final newline if there is one. (A line that is
1525continued doesn't include a final newline.) In the most common case, 1525continued doesn't include a final newline.) In the most common case,
1526the line height equals the height of the default frame font. 1526the line height equals the height of the default frame font.
1527 1527
1528 There are several other ways to change the line height, either by 1528 There are several ways to explicitly control or change the line
1529specifying an absolute height for the display line, or by adding 1529height, either by specifying an absolute height for the display line,
1530additional vertical space below each line. 1530or by adding additional vertical space below one or all lines.
1531 1531
1532@kindex line-height @r{(text property)} 1532@kindex line-height @r{(text property)}
1533 A newline can have a @code{line-height} text or overlay property that 1533 A newline can have a @code{line-height} text or overlay property
1534controls the total height of the display line ending in that newline. 1534that controls the total height of the display line ending in that
1535We will call the property value @var{line-height}. 1535newline. If the property value is zero, the displayed height of the
1536line is exactly what its contents need; no line-spacing is added.
1537This case is useful for tiling small images or image slices without
1538adding blank areas between the images.
1536 1539
1537 If @var{line-height} property is 0, the height of the line is 1540 If the property value is not zero, it specifies a desired height,
1538determined solely from its contents; nothing is added. Any 1541@var{line-height}. There are several ways it can do this:
1539@code{line-spacing} property on this newline is ignored. This case is
1540useful for tiling small images or image slices without adding blank
1541areas between the images.
1542 1542
1543 If @var{line-height} property is a positive integer, the value 1543@table @code
1544specifies the minimum line height in pixels. The line's ascent height 1544@item @var{integer}
1545is increased as necessary to achieve the specified height. 1545If the property is a positive integer, @var{line-height} is that integer.
1546@item @var{float}
1547If the property is a float, @var{float}, @var{line-height} is @var{float}
1548times the frame's default line height.
1549@item (@var{ratio} . @var{face})
1550If the property is a cons of the format shown, @var{line-height} is
1551@var{ratio} times the height of face @var{face}. @var{ratio} can be
1552any type of number. If @var{face} is @code{t}, it refers to the
1553current face.
1554@end table
1546 1555
1547 If @var{line-height} property is a floating point number, the 1556 Thus, any valid nonzero property value specifies a height in pixels,
1548minimum line height is the product of @var{line-height} and the 1557@var{line-height}, one way or another. If the line contents' height
1549default frame line height. 1558is less than @var{line-height}, Emacs adds extra vertical space above
1559the line to achieve the total height @var{line-height}. Otherwise,
1560@var{line-height} has no effect.
1550 1561
1551 If @var{line-height} property is a cons @code{(@var{ratio} . @var{face})}, 1562 If you don't specify the @code{line-height} propery, the line's
1552the minimum line height is calculated as @var{ratio} times the height 1563height consists of the contents' height plus the line spacing.
1553of face @var{face}. The @var{ratio} is an integer or a floating point
1554number. If @var{face} is @code{t}, it refers to the current face.
1555 1564
1556@vindex default-line-spacing 1565@vindex default-line-spacing
1557 You can specify additional line spacing for all lines in a frame 1566 You can specify the line spacing for all lines in a frame with the
1558with the @code{line-spacing} frame parameter, @xref{Window Frame 1567@code{line-spacing} frame parameter, @xref{Window Frame Parameters}.
1559Parameters}. However, if the variable @code{default-line-spacing} is 1568However, if the variable @code{default-line-spacing} is
1560non-@code{nil}, it overrides the frame's @code{line-spacing} 1569non-@code{nil}, it overrides the frame's @code{line-spacing}
1561parameter. An integer value specifies the number of pixels put below 1570parameter. An integer value specifies the number of pixels put below
1562lines on window systems. A floating point number specifies the 1571lines on window systems. A floating point number specifies the
1563spacing relative to the default frame line height. 1572spacing relative to the frame's default line height.
1564 1573
1565@vindex line-spacing 1574@vindex line-spacing
1566 You can specify additional line spacing for all lines in a buffer 1575 You can specify the line spacing for all lines in a buffer via the
1567via the buffer-local @code{line-spacing} variable. An integer value 1576buffer-local @code{line-spacing} variable. An integer value specifies
1568specifies the number of pixels put below lines on window systems. A 1577the number of pixels put below lines on window systems. A floating
1569floating point number specifies the spacing relative to the default 1578point number specifies the spacing relative to the default frame line
1570frame line height. 1579height. This overrides line spacings specified for the frame.
1571 1580
1572@kindex line-spacing @r{(text property)} 1581@kindex line-spacing @r{(text property)}
1573 Finally, a newline can have a @code{line-spacing} text or overlay 1582 Finally, a newline can have a @code{line-spacing} text or overlay
1574property that controls the height of the display line ending with that 1583property that controls the height of the display line ending with that
1575newline. The property value overrides the default frame line spacing 1584newline. The property value overrides the default frame line spacing
1576and the buffer local @code{line-spacing} variable. We will call the 1585and the buffer local @code{line-spacing} variable.
1577property value @var{line-spacing}.
1578 1586
1579 If the @var{line-spacing} value is a positive integer, the value 1587 One way or another, these mechanisms specify a line spacing for each
1580specifies additional vertical space, below the display line, in 1588line. Let's call the value @var{line-spacing}.
1581pixels. 1589
1590 If the @var{line-spacing} value is a positive integer, it specifies
1591the number of pixels of additional vertical space. This space appears
1592below the display line contents.
1582 1593
1583 If the @var{line-spacing} value is a floating point number or cons, 1594 If the @var{line-spacing} value is a floating point number or cons,
1584the additional vertical space is the product of @var{line-spacing} and 1595the additional vertical space is @var{line-spacing} times the frame
1585the default frame line height. 1596default line height.
1586 1597
1598@ignore @c I think we may want to delete this, so don't document it -- rms.
1587 If the @var{line-spacing} value is a cons @code{(total . @var{spacing})} 1599 If the @var{line-spacing} value is a cons @code{(total . @var{spacing})}
1588where @var{spacing} is any of the forms described above, the value of 1600where @var{spacing} is any of the forms described above, the value of
1589@var{spacing} specifies the total displayed height of the line, 1601@var{spacing} specifies the total displayed height of the line,
1590regardless of the height of the characters in it. This is equivalent 1602regardless of the height of the characters in it. This is equivalent
1591to using the @code{line-height} property. 1603to using the @code{line-height} property.
1604@end ignore
1592 1605
1593@node Faces 1606@node Faces
1594@section Faces 1607@section Faces