- From: Chris Wilson <cwilso@MICROSOFT.com>
- Date: Mon, 22 Mar 1999 10:51:44 -0800
- To: "'erik@netscape.com'" <erik@netscape.com>
- Cc: www-style@w3.org
Erik- In Windows, fonts have "internal leading" and "external leading". "Internal leading" is leading left specifically for diacritical marks and other accents. "External leading" can be thought of as the "suggested intra-line leading". The font-size in Windows is therefore the descent+ascent (which includes internal leading), but not the external leading. I think you're right, I think in X Windows the CSS font-size should be X's max ascent + max descent. -Chris Wilson > -----Original Message----- > From: erik@netscape.com [SMTP:erik@netscape.com] > Sent: Sunday, March 21, 1999 11:24 AM > To: Jan Roland Eriksson > Cc: www-style@w3.org > Subject: Re: font-size and line-height > > Jan Roland Eriksson wrote: > > > > On a few occasions the text of the CSS1 spec gives better explanation of > > things. From the CSS1 section on "Terminology" > > > > font size > > The size for which a font is designed. Typically, the size > > of a font is approximately equal to the distance from the bottom > > of the lowest letter with a descender to the top of the tallest > > letter with an ascender and (optionally) with a diacritical mark. > > This definition seems a little vague to me. It uses words like > "typically" (i.e. not always), "approximately" (i.e. not exactly), and > "optionally" (does the implementor get to choose whether or not to > include diacritical marks?). > > > Some illustrations here might be of interest... > > http://css.nu/articles/typograph1-en.html > > ...to clarify the meaning of this? > > Thanks for the pointer. > > The reason I'm asking about this is because I'm trying to implement CSS > on X Windows, and it has the following definitions: > > # 8.2.1. FONT_ASCENT > # > # FONT_ASCENT is an integer value (of type INT32) that gives the > recom- > # mended typographic ascent above the baseline for determining > interline > # spacing. Specific glyphs of the font may extend beyond this. If > the > # current position point for line n is at [X,Y], then the origin of > the > # next line m = n + 1 (allowing for a possible font change) is [X, Y > + > # FONT_DESCENTn + FONT_ASCENTm]. > # > # FONT_ASCENT can be approximated if not provided as a font > property, > # according to the following algorithm: > # > # if (FONT_ASCENT undefined) then > # FONT_ASCENT = maximum ascent > # > # where maximum ascent is the maximum ascent (above the baseline) in > pix- > # els of any glyph in the font. > # > # 8.2.2. FONT_DESCENT > # > # FONT_DESCENT is an integer value (of type INT32) that gives the > recom- > # mended typographic descent below the baseline for determining > interline > # spacing. Specific glyphs of the font may extend beyond this. If > the > # current position point for line n is at [X,Y], then the origin of > the > # next line m = n+1 (allowing for a possible font change) is [X, Y > + > # FONT_DESCENTn + FONT_ASCENTm]. > # > # The logical extent of the font is inclusive between the > Y-coordinate > # values: Y - FONT_ASCENT and Y + FONT_DESCENT + 1. > # > # FONT_DESCENT can be approximated if not provided as a font > property, > # according to the following algorithm: > # > # if (FONT_DESCENT undefined) then > # FONT_DESCENT = maximum descent > # > # where maximum descent is the maximum descent (below the baseline) > in > # pixels of any glyph in the font. > > These definitions would seem to suggest that FONT_ASCENT + FONT_DESCENT > includes the leading (i.e. in CSS terms, line-height - font-size). > However, the X document (XLFD) does say that specific glyphs may extend > beyond those boundaries. > > This is what confused me. Anyway, if nobody has further advice, I will > just take CSS font-size to be X's max ascent + max descent. > > Erik
Received on Monday, 22 March 1999 13:52:00 UTC