Re: the *precise* definition of 1em

   Date: Sun, 20 Jul 1997 01:10:04 +0200 (MET DST)
   From: Hakon Lie <howcome@w3.org>

   Joel,

    > What if I write something like this:
    >=20
    > BODY { font: numbers, someotherfont; font-size: 11pt }

   Slightly off topic: 'font' requires a size value as well as one (or
   more) font family values -- you should use 'font-family':

      BODY { font-family: numbers, someotherfont; font-size: 11pt }

My mistake.  (I guess I need to remind myself that I haven't exactly
memorizied the spec, so I need to refer to it before I write things
incorrectly.  However, the C code I write generally is written while
refering to the spec.)

    > Now, assume that numbers is a font that contains glyphs only for the=
    ten
    > digits, and someotherfont contains all the glyphs.  Furthurmore, ass=
   ume
    > that we don't have 11 point versions of either font, so we end up us=
   ing
    > a 10 point version of numbers and a 12 point version of someotherfon=
   t.

   Ok.

    > Now, the CSS1 spec does state that if we can't accomodate the exact
    > value, we should approximate, and use the approximated value.  But
    > in this example, it's hard to know which of the two fonts to use.

   Whenever 'numbers' contain the glyph you are looking for, it should be
   used. Othewise 'someotherfont' should be used. This way, you may end
   up using both fonts in the same element.

Yes, this is clearly true for displaying the font.

   This raises an issue: which
   of the values should be inherited? [1] specifies that it is the
   approximated value that should be inherited, but does not specify what
   happens when there are more than one approximated value. Suggestions?

   [1] http://www.w3.org/TR/REC-CSS1-961217#length-units

If I write font-size: 1em for a child element of our numbers and
someotherfont, it would be best to have 11 points be the inherited value.
For example, if we decide to use the 10 point value from the numbers
font, and someotherfont exists as only as a 9 and 12 point font,
the if 10 points is the inherited value, someotherfont will be smaller
after being changed to 1em.

So if the only criterion being used is that 1em should give you the same
size as the parent, the approximating will cause problems when using mutliple
fonts, and we shouldn't approximate.

(Is this clear yet?)

    > but to make sure that writing font-size: 1em will be a no-op, I gues=
   s
    > we have to use 11pt, thus *not* approximating.  (It's also much easi=
   er
    > for me to implement it that way :)

   I don't quite understand what you mean here. The UA may have to
   approximate even if '11pt' is specified. If '1em' is specified, it is
   relative (1em=3D100%) to the font size of the parent element (HTML).

What I mean is that if some element which is a child of our
font-family: numbers, someotherfont is declared with font-size: 1em,
we want that child to look the same as if 1em had not been specified.

Received on Saturday, 19 July 1997 19:37:42 UTC