- From: Chris Lilley <chris@w3.org>
- Date: Sat, 20 Nov 1999 21:49:38 +0100
- To: Erik van der Poel <erik@netscape.com>
- CC: www-style@w3.org
Erik van der Poel wrote: > > All, > > I'm still concerned about CSS's "font-size". The CSS2 spec where, exactly? > and several > members of the CSS community seem to indicate that the CSS font-size > includes not only the descenders and ascenders, but also any accents > that might be placed on top of glyphs (e.g. capital E with acute > accent). The CSS2 spec talks quite plainly about the ascent being the maximum unaccenmted height of the font. > However, I have also seen a couple of sources that give a different > meaning for the "point size" of a font. For example, "The PostScript > Font Handbook" says that "Point size is measured from the top of the > ascender to the bottom of the descender." It says that the ascender is > "the part of a lowercase letter, such as in b or h, that rises above the > x-height", while the descender is "the part of a character that extends > below the baseline, as in g or p". Yes, that seems right. > > Another source is the Windows API documentation. It says that the height > of a font with a certain point size can be specified as: > > lfHeight = -MulDiv(PointSize, GetDeviceCaps(hDC, LOGPIXELSY), 72); > > When lfHeight is negative, the font mapper uses the "character height" > rather than the "cell height", where cell height is defined to be > character height plus "internal leading", which is where accents occur: > > http://msdn.microsoft.com/library/psdk/gdi/fontext_1wmq.htm > http://msdn.microsoft.com/library/psdk/gdi/fontext_2zqq.htm > > Now, these discrepancies wouldn't bug me so much if we could somehow > hide all of this from the user, but there is one area where I believe we > have to reveal something to the user, and that is the font preferences > dialog, where we allow users to set their default font size. > > The old Netscape UA code base used negative lfHeight values, so people > accustomed to that UA may have come to expect the point size to mean the > unaccented height of the font. So they should. > If the new Mozilla code base suddenly > switches to positive lfHeight values (to comply with CSS2), I don't see how it would make it comply with CSS2. -- Chris
Received on Saturday, 20 November 1999 15:49:43 UTC