Re: font-size and accents, again

Erik van der Poel wrote:
> 
> Now I have a question about aligning text vertically inside its inline
> box. Is the implementor supposed to use the max ascent (i.e. including
> any protruding glyphs) or the ascent (i.e. excluding any protruding
> glyphs)?

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?

Assuming that the font-size is 12pt, the line-height is 14pt and that
1pt should be added above and below, I think that the vertical alignment
should be (1pt + ascent), not (1pt + max ascent), since the 12pt
font-size does not include the max ascent and max descent.

Erik

Received on Saturday, 27 November 1999 03:15:45 UTC