RE: Line layout in browsers

Hello, all.

Thanks to this thread I believe I understand the overlapping SPAN. But I'm
curious regarding the source for a couple of contentions.

| ...the default value of "normal" for line-
| height results in the browser using the line height that is built into
| the font itself.

How is the line-height built into the font? There is no line-height, per se,
in PostScript font metrics*. It's my impression from a cursory reading that
the TrueType metrics are similar.

| "normal" line height is what font designer decided would be the
| perfect distance between two lines; when represented in EMs it is
| nearly always bigger than one.

Really? There was no "perfect distance" back when I was spec'ing metal type.
So, what of all those fonts whose designers died before the advent of
desktop publishing? Was there a seance to determine the designers' intent?
;-)

AFIK, the only way for a font designer to ensure some minimum space between
lines is to make the glyph smaller within the font's bounding box (the extra
space is part of the 1 em height). It is then up to the document designer to
choose a larger font size to obtain the same apparent character height
(e.g., compare Vladimir Script and Helvetica Inserat at the same font size).

'Normal' is supposedly a "reasonable" value to keep the text legible. The
document designer is the final arbiter of 'perfect' line height, which
depends on various factors including font size (relatively less line spacing
is needed as font size increases). In the case of all caps headlines,
negative line spacing is sometimes appropriate. If you, as document
designer, have no 'feel' for appropriate line height, then, by all means,
choose 'normal'.

ALSO, I'm still curious regarding the logic behind the vertical positioning
of text within line boxes. I set up a series of DIVs with 100px font size
and >= line heights (http://www.hpaa.com/css2/span.htm) and found that text
is too low relative to the box in both FF and Opera on Win2K. CSS 2.1,
section 10.8.1 states: "User agents center glyphs vertically in an inline
box..." That is clearly not the case here.

Cheers,
David Perrell

* www.adobe.com/devnet/font/pdfs/5004.AFM_Spec.pdf

Received on Wednesday, 23 January 2008 19:15:26 UTC