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

Re: font-size and accents, again

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Sat, 27 Nov 1999 10:26:14 -0500 (EST)
Message-Id: <199911271526.KAA14604@is07.fas.harvard.edu>
To: erik@netscape.com, www-style@w3.org
On Sat, 27 Nov 1999 00:13:51 -0800, erik@netscape.com (Erik van der
Poel) wrote:
> 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)?
> 
> 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.

I agree that you should use ascent, because otherwise it wouldn't be
aligned correctly from the bottom (i.e., centered).  (The way you
propose to do things, ascent + descent = font-size, right?  And I
assume by "vertical alignment" you mean the distance from the top of
the inline box to the baseline of the text.)

-David

L. David Baron    Sophomore, Harvard (Physics)    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.     <URL: http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                      <URL: http://www.webstandards.org/css/ >
Received on Saturday, 27 November 1999 10:28:47 GMT

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