changeset 55245:902d9cd6cdb6

*** empty log message ***
author Kim F. Storm <storm@cua.dk>
date Thu, 29 Apr 2004 22:41:05 +0000
parents c5bad07bbb95
children 33248295ffc4
files etc/NEWS src/ChangeLog
diffstat 2 files changed, 45 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Thu Apr 29 22:37:52 2004 +0000
+++ b/etc/NEWS	Thu Apr 29 22:41:05 2004 +0000
@@ -2013,20 +2013,27 @@
 height it increased by increasing the line's ascent.
 
 If the line-height property value is a float, the minimum line height
-is calculated by multiplying the height of the current face font by
-the given value.
-
-If the line-height property value is t, the minimum line height is
-the height of the default frame font.
-
-If the line-spacing property value is an integer, the value is used as
-additional space to put after the display line; this overrides the
-default frame line-spacing and any buffer local value of the
-line-spacing variable.
-
-If the line-spacing property value is a float, the value is multiplied
-by the current height of the display row to determine the additional
-space to put after the display line.
+is calculated by multiplying the default frame line height by the
+given value.
+
+If the line-height property value is a cons (RATIO . FACE), the
+minimum line height is calculated as RATIO * height of named FACE.
+RATIO is int or float.  If FACE is t, it specifies the current face.
+
+If the line-spacing property value is an positive integer, the value
+is used as additional pixels to insert after the display line; this
+overrides the default frame line-spacing and any buffer local value of
+the line-spacing variable.
+
+If the value is a negative integer, the absolute value is used as the
+total height of the line, i.e. a varying number of pixels are
+inserted after each line to make each line exactly that many pixels high.
+
+If the line-spacing property may be a float or cons, the line spacing
+is calculated as specified above for the line-height property.
+
+** The buffer local line-spacing variable may now have a float value,
+which is used as a height relative to the default frame line height.
 
 ** Enhancements to stretch display properties
 
@@ -3417,7 +3424,7 @@
 running under X.
 
 ** Arguments for remove-overlays are now optional, so that you can remove
-all overlays in the buffer by just calling (remove-overlay). 
+all overlays in the buffer by just calling (remove-overlay).
 
 ** New packages:
 
--- a/src/ChangeLog	Thu Apr 29 22:37:52 2004 +0000
+++ b/src/ChangeLog	Thu Apr 29 22:41:05 2004 +0000
@@ -1,3 +1,26 @@
+2004-04-30  Kim F. Storm  <storm@cua.dk>
+
+	* buffer.c (syms_of_buffer) <line-spacing>: Allow float value.
+
+	* dispextern.h (struct it): Remove member use_default_face.
+	Add members override_ascent, override_descent, override_boff.
+
+	* xdisp.c (init_iterator): Handle line-spacing float value.
+	Initialize override_ascent member.
+	(append_space_for_newline): Reset override_ascent.
+	Remove use_default_face.
+	(calc_line_height_property): New function to calculate value of
+	line-height and line-spacing properties.  Look at overlays, too.
+	Set override_ascent, override_descent, override_boff members when
+	using another face than the current face.  Float values are now
+	relative to the frame default font, by default; accept a cons
+	of ratio and face name to specify value relative to a specific face.
+	(x_produce_glyphs): Use calc_line_height_property.
+	Use override_ascent etc. when set to handle different face heights.
+	A negative line-spacing property value is interpreted as a total
+	line height, rather than inter-line spacing.
+	(note_mouse_highlight): Allocate room for 40 overlays initially.
+
 2004-04-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* data.c (Fsubr_name): New fun.