Lisp_Object Qslice;
Lisp_Object Qcenter;
Lisp_Object Qmargin, Qpointer;
-Lisp_Object Qline_height;
+Lisp_Object Qline_height, Qtotal;
extern Lisp_Object Qheight;
extern Lisp_Object QCwidth, QCheight, QCascent;
extern Lisp_Object Qscroll_bar;
Returns height in pixels, or nil. */
static Lisp_Object
-calc_line_height_property (it, prop, font, boff)
+calc_line_height_property (it, prop, font, boff, total)
struct it *it;
Lisp_Object prop;
XFontStruct *font;
- int boff;
+ int boff, *total;
{
Lisp_Object val;
Lisp_Object face_name = Qnil;
if (NILP (val))
return val;
+ if (total && CONSP (val) && EQ (XCAR (val), Qtotal))
+ {
+ *total = 1;
+ val = XCDR (val);
+ }
+
if (INTEGERP (val))
return val;
But if previous part of the line set a height, don't
increase that height */
- Lisp_Object height, spacing;
+ Lisp_Object height;
it->override_ascent = -1;
it->pixel_width = 0;
it->nglyphs = 0;
- height = calc_line_height_property(it, Qline_height, font, boff);
+ height = calc_line_height_property(it, Qline_height, font, boff, 0);
if (it->override_ascent >= 0)
{
}
else
{
+ Lisp_Object spacing;
+ int total = 0;
+
it->phys_ascent = it->ascent;
it->phys_descent = it->descent;
if (!NILP (height)
&& XINT (height) > it->ascent + it->descent)
it->ascent = XINT (height) - it->descent;
- }
- spacing = calc_line_height_property(it, Qline_spacing, font, boff);
- if (!NILP (spacing))
- {
- int sp = XINT (spacing);
- if (sp < 0)
- extra_line_spacing = (-sp) - (it->phys_ascent + it->phys_descent);
- else
- extra_line_spacing = sp;
+ spacing = calc_line_height_property(it, Qline_spacing, font, boff, &total);
+ if (INTEGERP (spacing))
+ {
+ extra_line_spacing = XINT (spacing);
+ if (total)
+ extra_line_spacing -= (it->phys_ascent + it->phys_descent);
+ }
}
}
else if (it->char_to_display == '\t')
staticpro (&Qcenter);
Qline_height = intern ("line-height");
staticpro (&Qline_height);
+ Qtotal = intern ("total");
+ staticpro (&Qtotal);
QCalign_to = intern (":align-to");
staticpro (&QCalign_to);
QCrelative_width = intern (":relative-width");