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

Chris Lilley wrote:
> 
> Erik van der Poel wrote:
> >
> > 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?

No, that is a circular definition. The definition for line-height says
that the value 1 means the same as the font-size, so you need to define
font-size in terms of something else. How about the following
definition:

  This property corresponds directly to the em square [link to
  definition of em square]. Outline fonts are scaled to make
  their em square height coincide with the requested font-size.
  Bitmap fonts have a size property expressed as a number of
  pixels. UAs may search for the bitmap font with the size
  closest to the requested font-size. See also the font matching
  algorithm [link to font-size part of font matching algorithm].

> > 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.

I'm not really sure what you mean by "built-in leading", but TrueType
has a field to store the recommended leading. This leading is of course
defined in the same units as the "unitsPerEm". E.g. unitsPerEm might be
2048, and the recommended leading might be 300, while the ascent is 1600
and the descent is 448 (i.e. 1600 + 448 = 2048). The recommended
inter-baseline spacing is then 2048 + 300 = 2348. Some fonts don't have
their ascent and descent add up to the unitsPerEm, but those fonts have
a large leading value, such that ascent + descent + leading still gives
the recommended baseline spacing. See the www-font@w3.org archives:

  http://lists.w3.org/Archives/Public/www-font/1999OctDec/

line-height == font-size only when line-height is 1 (or 1em). When
line-height is "normal", my suggestion is to add the recommended leading
to the em square height (font size). I.e. line-height: normal -> 2348,
in the example above.

> 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

No, that is not how I understood it. If the font is defined on a
2048-unit grid, it does not matter how large or small the glyphs are in
relation to this grid. CSS's "1em" corresponds to the 2048-unit square,
appropriately scaled down to the requested font-size (e.g. font-size:
16px).

> 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.

Are these European fonts also available in TrueType format? Do they work
well with Windows? For example, can you mix American and European fonts
on the same line at the same font-size, and still "look OK"?

Erik

Received on Thursday, 20 January 2000 18:03:48 UTC