W3C home > Mailing lists > Public > www-style@w3.org > February 2000

RE: What's an em

From: Todd Fahrner <fahrner@pobox.com>
Date: Wed, 2 Feb 2000 11:49:05 -0800
Message-Id: <v04220802b4be28aff533@[216.185.5.103]>
To: Clive Bruton <clive@typonaut.demon.co.uk>, <www-font@w3.org>
Cc: <www-style@w3.org>
At 5:22 PM +0000 2/2/00, Clive Bruton wrote:
>Karlsson Kent - keka wrote at 02/02/00 16:20
>
>  >Assume the (lowercase dominated) headings are asked (by the page author)
>  >to be of x-height 7 mm in Flemish Script, the body text (lowercase
>  >dominated) to be of x-height 3.5 mm Verdana.
>
>I think trying to specify type on screen in mm would be a mistake, but...

<aside>Not any more than specifying it in points. Any use of absolute 
length units for the screen media type is ill-advised. The CSS Recs 
support this assertion obliquely, and the WAI authoring guidelines 
explicitly.</aside>

>  >Whatever font substitutions
>  >are done (keeping the asked-for x-heights to a reasonable degree), one
>  >would still get a proper percieved size difference between the heading
>  >and the body text.  Right? Or???
>
>Yes, great. What would the line-height be? For a clue on this look at the
>examples on the CSS2 page, where line-height is maintained and ascender
>and descenders clash where the x-height has been taken as the defintive
>measurement.

Look, Verdana and Flemish Script are together in the example because 
extreme examples make certain points very clear, which is useful when 
more realistically subtle illustrations might be lost upon the 
audience. Unfortunately, they also provide bait for reductio ad 
absurdam arguments among the cognoscenti. It is exceedingly unlikely 
that one of these faces will be substituted for another in practice, 
at least not as long as author and reader are trying to get along, 
which is the business at hand.

It's well-established practice in CSS to specify font families in a 
prioritized list, with the generic family (sans, serif, script, etc.) 
last in the list, so mixing up script and sans-serif is the result of 
incompetent usage, not a language design flaw. (And anyway, I 
consider the ascender/descender clash less tragic than the 
"unadjusted substitution" alternative; really cautious authors can 
spec extra line-height to be on the safe side, and god knows typical 
Web text would benefit from that!)

>Strange calculations that show what happens in extremes, or in real world
>situations!?
>
>Please, show me a "real world" calculation that fits your model?

problem:
1. Users A and B have set up their agents to default to 12px Times. 
Or Minion Web if you prefer.
2. Author calls for body text to be in Verdana (with fallbacks to 
Arial, Helvetica, sans-serif), in the user's preferred size (no size 
specified).
3. User A calls up site, and remarks that body text looks too big, 
horsey, silly.
4. Author/designer/marketing director re-specifies the body text as 
.8em Verdana. Verdana now looks approximately as large as Times at 
the user's preferred size.
5. User B calls up site, doesn't have Verdana, but does have Arial. 
And sees it reduced to near-illegibility.
6. [a digression] font size fails to inherit into table elements in 
Netscape 4.x and WinIE (a cherished bug), so author selects both body 
and TD and sets both to .8em. Since these elements are in an 
ancestor/descendant relationship, text in TD ought really be .64em 
(.8x.8), which is what users with conformant agents (MacIE, Opera, 
Mozilla) will see: illegibly ill-resolved.

solution:
1. Users A and B have set up their agents to default to 12px Times. 
Or Minion Web if you prefer.
2. Author calls for body text to be in Verdana (with fallbacks to 
Arial, Helvetica, sans-serif), in the user's preferred size (no size 
specified), and provides the aspect of Verdana as the 
font-size-adjust value: .58.
3. User A calls up site, and his/her agent compares the aspect of 
Times (recorded in the user stylesheet/prefs) with that of the 
specified Verdana, and scales Verdana to 10px to equalize x-height 
with 12px Times. Extra added bonus: since the line-height remains at 
the value appropriate to "solid" 12px Times, Verdana has now gained a 
little air. And there is much rejoicing.
4. User B calls up site, doesn't have Verdana, but does have Arial. 
Since Arial and Times have very similar aspects, no scaling occurs, 
and the size looks/feels right to everybody. Remember, we're talking 
about a design grid with fewer pixels than you have fingers and toes 
- no sense agonizing over the uncompensated hairline serifs.
5. [the digression rejoined] Since no "medium" font size is ever 
specified, there are no legacy CSS inheritance issues to contend with.

>If you scale x-height you also have to scale the other factors of
>design/perception.

We can't have the ultimate solution all at once, Clive. Baby steps 
before pole-vaulting. Not even the 1996 CSS-1 specification has been 
completely implemented yet, anywhere.

--
Todd Fahrner
Received on Wednesday, 2 February 2000 14:49:11 GMT

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