Re: the *precise* definition of 1em

Joel N. Weber II wrote:
> I think that in general, 1em for things other than font-size ought to
> the biggest size of any one font, since we want to make sure we have
> enough space for the largest font.  For font-size, I'd prefer to use
> the approximated value if it's the same for all fonts, otherwise the
> user-specified value.

Mixing font-families in an element could be very unstylish. Mixing
sizes could be downright ugly. How do I specify to the user agent I
don't want mixed sizes? What's the percentage variation that can be
considered an approximation and not an abomination? I suspect it's
subjective. Some readers will see .5 pt variations as annoying,
especially if off-sized fonts are of a different family.

> Scalable fonts are supported, but not all fonts are scalable.

Do the non-scalable fonts have cross-platform font-family names that
can be specified in a stylesheet? What fonts are generally available on
an X11 terminal? Is there a full range of serif and sans-serif sizes?
Stylesheet writers wanting to be appreciated on X11 will need to know.

There are non-scalable fonts in Windows, and if "fixedsys" is specified
in a stylesheet, IE3.02 renders it at the fixed size, regardless of the
specified size. Navigator 4.01, however, is a bit more sophisticated.
It scales the 'non-scalable' font, so there will never be a size

> If we can't scale the font, we still have to do something.

How does Navigator scale the non-scalable font? Dunno, but the simplest
approach would be to write your own simple font scaler by rendering the
entire font in an offscreen buffer, scaling the character offsets to
match the specified size. If you don't have font metrics, you could
take the size of your line-box as specified by the stylesheet, create a
display buffer at the scaled size, render your line of text in the
buffer, then scale the bitmap buffer to match the display (gets
complicated with inline elements and mixed fonts).

In any case, I think the unapproximated em value should be used for
computation. Font substitution may only occur in one of many
consecutive elements. If children of that one element are noticeably
changed as a result, it could change the visible structure of the

David Perrell