Re: CSS enhancement proposal
On Jun 14, 7:03pm, while I was out of email contact sorry, Todd Fahrner wrote:
> Typefaces and type sizes are now specified independently in CSS. More
> precisely, there is a mechanism to suggest alternate typefaces, but
> not to bind alternate type sizes and line-heights to the alternate
> typefaces. This is not especially useful, as typefaces have highly
> irregular metrics and suitability for screen display at a given size.
So the best thing, then, would be to
- describe their metrics (in an opsys-independent way)
- avoid pixel units, or implement the pixel definition of CSS1
- make less assumptions about pixel density.
> It would be far better to specify typefaces, type sizes, and
> line-heights (and possibly also letterspacing) together, and let
> these cascade/degrade as groups.
perhaps. And colors too?
> Consider this case:
> font: 9pt/15pt Verdana, "Gill Sans," sans-serif;
> This will result in a very legible Verdana (unless it's a Mac),
This looks like a crude hack designed to compensate for the different
descriptions of ascent and descent used by Win32 and MacOS platforms,
and perhaps also for the unfortunate built-in leading found in older
versions of some CSS-enabled browsers.
There is a (third) description of ascent and descent for Truetype fonts
which avoids this and has the same definition on the two platforms.
Look for sTypoAscender and sTypoDescender in the OS/2 table (ref here to
the OpenType definition of the bizzarely-named OS/2 table, since the
description of the TrueType table is in some proptietary format ;-)
Compare with usWinAscent and usWinDescent in the same table, and
ascent and descent in the hhea table:
> a wretched, overleaded Gill Sans,
side effect of hack applied above ;-)
> This facility will become more important once embedded type comes
> into wider use - authors will sometimes want to suggest (and provide)
> highly idiosyncratic typefaces, whose size and leading are not
> suitable for second- or third-choice alternates.
An arguable point, it depends on whether you see second and third
choices as being close alternatives or as completely separate designed.
The latter are perhaps better handled by using separately titled
Chris Lilley, W3C [ http://www.w3.org/ ]
Graphics and Fonts Guy The World Wide Web Consortium
http://www.w3.org/people/chris/ INRIA, Projet W3C
firstname.lastname@example.org 2004 Rt des Lucioles / BP 93
+33 (0)4 93 65 79 87 06902 Sophia Antipolis Cedex, France