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: Fri, 26 Nov 1999 16:18:46 -0800
Message-ID: <383F2366.D24CF301@netscape.com>
To: www-style@w3.org
All,

I had another look at David Baron's font-size test page, and thought
about it some more:

  http://www.fas.harvard.edu/~dbaron/css/fonts/sizes/

It seems like the font-size is supposed to be the "em square", and that
some glyphs actually protrude outside that square in digital fonts (as
explained by Todd). All of the browsers listed on the above page use
this definition of the font size, and are therefore correct, I think.

When the line-height is 1, the distance from baseline to baseline should
be the same as the font size. Since some glyphs actually protrude above
or below the em square, it is possible to get glyph collisions when the
line-height is 1. That is another good reason for selecting a better
value for line-height. Opera 3.60 and MSIE5 (without image) give the
correct results for line-height.

It seems to me that the background should be as tall as the inline
element. Since David's page selects a line height of 1, some glyphs
stick out of the inline box. Opera 3.60 correctly colors the background
only inside the inline box.

The image's height is set to 1em, which is 100px, so several of the
browsers get this one right.

So it looks like Opera 3.60 is the only one to get all of them right.

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)?

Erik
Received on Friday, 26 November 1999 19:21:27 GMT

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