Re: Units, font sizing, and zoom suggestion for CSS 3

Erik van der Poel wrote:
> Sigh. I'm beginning to wonder whether defining font-size in terms of
> "em" or "em square" is good enough. TrueType definitely has a field
> called "unitsPerEm" in the "head" table:

Where do you think CSS got that descriptor from ;-)

imitation is the sincerest form of flattery.

> I would really like to move away from the definition involving the words
> "when set solid". That definition just doesn't mean very much, 

would "when line-height==font-size" be preferable? Because that is what
"set solid" meant, when I wrote it.

and
> that's why I had to ask so many questions on this mailing list.
> 
> The em square is defined in CSS2 as follows:
> 
>   15.4.3 Coordinate units on the em square
> 
>   Certain values, such as width metrics, are expressed in
>   units that are relative to an abstract square whose
>   height is the intended distance between lines of type
>   in the same type size. This square is called the em
>   square and it is the design grid on which the glyph
>   outlines are defined. The value of this descriptor
>   specifies how many units the EM square is divided into.
>   Common values are for example 250 (Intellifont), 1000
>   (Type 1) and 2048 (TrueType, TrueType GX and OpenType).
> 
>   If this value is not specified, it becomes impossible
>   to know what any font metrics mean. For example, one
>   font has lowercase glyphs of height 450; another has
>   smaller ones of height 890! The numbers are actually
>   fractions; the first font has 450/1000 and the second
>   has 890/2048 which is indeed smaller.
> 
> This definition seems to have a mistake. The em square height is not the
> intended distance between baselines. 

Yes, you are right. This is a definiton of 'units-per-em', or in other
words the internal structure of the gyphs as they relate to the design
grid size, not the CSS em unit. But I think there was a consistency pass
done on that text which introduced this error.

> You need to add the recommended
> leading to the em square height to get the recommended inter-baseline
> distance.

Yes, you need to get the built-in leading: but in that case,
line-height== font-size. But also, for example, you might have a font
which was defined on +- 2048 but which actualy used the values +800 to
-300 for the actual glyphs - the 'em size' of the font would be
1100/4096 (plus, as you say, any built-in spacing).

On the other hand there are fonts that regularly go outside their design
grid. Fonts for the American market regard unaccented capital letters as
normal so all accents are outside the deiign griud. Font sfor the
European market regard accented capitals as normal (but with only one
accent, and a small one at that) so talk about things like the Å-height.
Fonts designed for Thai or for Vietnamese (with up to three accents on a
letter) will have the cap height very far down compared to a typical
American font,and will appear to have lots of "internal leading" if used
for unaccented Latin text.

> With em square defined like this (plus my correction), maybe it is OK to
> define font-size in terms of em square.

--
Chris

Received on Thursday, 20 January 2000 16:48:40 UTC