- From: David Perrell <davidp@earthlink.net>
- Date: Sat, 27 Nov 1999 23:35:26 -0800
- To: www-style@w3.org
Erik van der Poel wrote: > CSS2, section 10.8.1: > > User agents center glyphs vertically in an inline box, adding > half-leading on the top and bottom. For example, if a piece > of text is '12pt' high and the 'line-height' value is '14pt', > 2pts of extra space should be added: 1pt above and 1pt below > the letters. > > I assume that the intent of this paragraph was to have a font-size of > 12pt with a line-height of 14pt, but it says that the *text* is 12pt. Is > this a typo in the spec? "12pt text" means the same thing as font-size: 12pt. Whatever, section 10.8.1 certainly isn't clear about the vertical position of text within the inline box. If it were taken literally, each glyph would be centered individually. Is the intent is to position each text element vertically centered in its inline box? How about this: "The height of a font's character glyphs may not be the same as the the font's size. In dual-case fonts, for example, the vertical distance between the ascender (the top of the lowercase 'd') and the descender (the bottom of the lowercase 'p') is typically less than the size of the font, while the distance from the top of accented uppercase characters to the bottom of the descender may be greater than the size of the font. User agents should position text such that a horizontal line equidistant from the top of the ascender and the bottom of the descender is congruent with a horizontal line bisecting the inline box." But vertical centering of glyphs presents a problem if you want to mix typefaces on a line and still get consistent line spacing. Aligning inline boxes with different typefaces to their respective baselines will very likely result in a text box taller than the specified line-height. David Perrell
Received on Sunday, 28 November 1999 02:36:22 UTC