aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lispref/display.texi89
1 files changed, 88 insertions, 1 deletions
diff --git a/lispref/display.texi b/lispref/display.texi
index cd836023aac..1c9c8bdd820 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -23,6 +23,7 @@ that Emacs presents to the user.
23* Temporary Displays:: Displays that go away automatically. 23* Temporary Displays:: Displays that go away automatically.
24* Overlays:: Use overlays to highlight parts of the buffer. 24* Overlays:: Use overlays to highlight parts of the buffer.
25* Width:: How wide a character or string is on the screen. 25* Width:: How wide a character or string is on the screen.
26* Line Height:: Controlling the height of lines.
26* Faces:: A face defines a graphics style for text characters: 27* Faces:: A face defines a graphics style for text characters:
27 font, colors, etc. 28 font, colors, etc.
28* Fringes:: Controlling window fringes. 29* Fringes:: Controlling window fringes.
@@ -1510,6 +1511,85 @@ the beginning of the result if one multi-column character in
1510@end example 1511@end example
1511@end defun 1512@end defun
1512 1513
1514@node Line Height
1515@section Line Height
1516@cindex line height
1517
1518 The total height of each display line consists of the height of the
1519contents of the line, and additional vertical line spacing below the
1520display row.
1521
1522 The height of the line contents is normally determined from the
1523maximum height of any character or image on that display line,
1524including the final newline if there is one. (A line that is
1525continued doesn't include a final newline.) In the most common case,
1526the line height equals the height of the default frame font.
1527
1528 There are several other ways to change the line height, either by
1529specifying an absolute height for the display line, or by adding
1530additional vertical space below each line.
1531
1532@kindex line-height @r{(text property)}
1533 A newline can have a @code{line-height} text or overlay property that
1534controls the total height of the display line ending in that newline.
1535We will call the property value @var{line-height}.
1536
1537 If @var{line-height} property is 0, the height of the line is
1538determined solely from its contents; nothing is added. Any
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
1543 If @var{line-height} property is a positive integer, the value
1544specifies the minimum line height in pixels. The line's ascent height
1545is increased as necessary to achieve the specified height.
1546
1547 If @var{line-height} property is a floating point number, the
1548minimum line height is the product of @var{line-height} and the
1549default frame line height.
1550
1551 If @var{line-height} property is a cons @code{(@var{ratio} . @var{face})},
1552the minimum line height is calculated as @var{ratio} times the height
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
1556@vindex default-line-spacing
1557 You can specify additional line spacing for all lines in a frame
1558with the @code{line-spacing} frame parameter, @xref{Window Frame
1559Parameters}. However, if the variable @code{default-line-spacing} is
1560non-@code{nil}, it overrides the frame's @code{line-spacing}
1561parameter. An integer value specifies the number of pixels put below
1562lines on window systems. A floating point number specifies the
1563spacing relative to the default frame line height.
1564
1565@vindex line-spacing
1566 You can specify additional line spacing for all lines in a buffer
1567via the buffer-local @code{line-spacing} variable. An integer value
1568specifies the number of pixels put below lines on window systems. A
1569floating point number specifies the spacing relative to the default
1570frame line height.
1571
1572@kindex line-spacing @r{(text property)}
1573 Finally, a newline can have a @code{line-spacing} text or overlay
1574property that controls the height of the display line ending with that
1575newline. The property value overrides the default frame line spacing
1576and the buffer local @code{line-spacing} variable. We will call the
1577property value @var{line-spacing}.
1578
1579 If the @var{line-spacing} value is a positive integer, the value
1580specifies additional vertical space, below the display line, in
1581pixels.
1582
1583 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
1585the default frame line height.
1586
1587 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
1589@var{spacing} specifies the total displayed height of the line,
1590regardless of the height of the characters in it. This is equivalent
1591to using the @code{line-height} property.
1592
1513@node Faces 1593@node Faces
1514@section Faces 1594@section Faces
1515@cindex faces 1595@cindex faces
@@ -2826,7 +2906,14 @@ non-@code{nil} parameter value means they do. The frame parameter
2826@code{scroll-bar-width} specifies how wide they are (@code{nil} 2906@code{scroll-bar-width} specifies how wide they are (@code{nil}
2827meaning the default). @xref{Window Frame Parameters}. 2907meaning the default). @xref{Window Frame Parameters}.
2828 2908
2829You can also control this for individual windows. Call the function 2909@vindex vertical-scroll-bar
2910 You can enable or disable scroll bars for a particular buffer,
2911by setting the variable @code{vertical-scroll-bar}. This variable
2912automatically becomes buffer-local when set. The possible values are
2913@code{left}, @code{right}, @code{t}, which means to use the
2914frame's default, and @code{nil} for no scroll bar.
2915
2916 You can also control this for individual windows. Call the function
2830@code{set-window-scroll-bars} to specify what to do for a specific window: 2917@code{set-window-scroll-bars} to specify what to do for a specific window:
2831 2918
2832@defun set-window-scroll-bars window width &optional vertical-type horizontal-type 2919@defun set-window-scroll-bars window width &optional vertical-type horizontal-type