W3C home > Mailing lists > Public > www-style@w3.org > November 1999

Re: font-size and accents, again

From: Erik van der Poel <erik@netscape.com>
Date: Sat, 27 Nov 1999 00:13:51 -0800
Message-ID: <383F92BF.BBE934DA@netscape.com>
To: www-style@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:01 GMT