Re: the *precise* definition of 1em

   From: "David Perrell" <davidp@earthlink.net>
   Cc: <www-style@w3.org>
   Date: Mon, 21 Jul 1997 10:40:32 -0700
   X-MSMail-Priority: Normal
   X-Priority: 3
   X-Mailer: Microsoft Internet Mail 4.70.1161
   MIME-Version: 1.0
   Content-Type: text/plain; charset=ISO-8859-1
   Content-Transfer-Encoding: 7bit

   Joel N. Weber II wrote:
   > I think that in general, 1em for things other than font-size ought to
   be
   > 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?

As far as I know, no mechanism has every been proposed for css1
to specify how much variation is allowed.

   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.

The CSS1 spec allows up to a 20% variation from what the user specified.
However, it is possible for a UA to make this configurable.
My understanding is that a UA can conform to the spec as long as it
will never use a font which is more than a 20% difference from the
user-specified size.  So if a UA usings 10% or 5% or 0%, that's fine.

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

That depends entirely on how the X server is configured.

For the particular NCD X11R5 terminal I'm thinking about, here's the
output of `xlsfonts':

10x20      8x13       cursor     fixed      
6x10       9x15       fg-22      vtsingle   

I suspect there is a way to add fonts, but I don't know how to do that.

There are 732 fonts avaialbe on my GNU/Linux system.  Here are a
few examples:

-dec-terminal-bold-r-normal--0-0-75-75-c-0-dec-dectech
-dec-terminal-bold-r-normal--0-0-75-75-c-0-iso8859-1
-dec-terminal-bold-r-normal--14-140-75-75-c-80-dec-dectech
-dec-terminal-bold-r-normal--14-140-75-75-c-80-iso8859-1
-dec-terminal-medium-r-normal--0-0-75-75-c-0-dec-dectech
-dec-terminal-medium-r-normal--0-0-75-75-c-0-iso8859-1
-dec-terminal-medium-r-normal--14-140-75-75-c-80-dec-dectech
-dec-terminal-medium-r-normal--14-140-75-75-c-80-iso8859-1
-bitstream-charter-black-i-normal--0-0-0-0-p-0-iso8859-1
-bitstream-charter-black-r-normal--0-0-0-0-p-0-iso8859-1
-bitstream-charter-bold-i-normal--0-0-0-0-p-0-iso8859-1
-bitstream-charter-bold-r-normal--0-0-0-0-p-0-iso8859-1
-adobe-times-bold-i-normal--11-80-100-100-p-57-iso8859-1
-adobe-times-bold-i-normal--12-120-75-75-p-68-iso8859-1
-adobe-times-bold-i-normal--14-100-100-100-p-77-iso8859-1
-adobe-times-bold-i-normal--14-140-75-75-p-77-iso8859-1
-adobe-times-bold-i-normal--17-120-100-100-p-86-iso8859-1
-adobe-times-bold-i-normal--18-180-75-75-p-98-iso8859-1
-adobe-times-bold-i-normal--20-140-100-100-p-98-iso8859-1
-adobe-times-bold-i-normal--24-240-75-75-p-128-iso8859-1
-adobe-times-bold-i-normal--25-180-100-100-p-128-iso8859-1
-adobe-times-bold-i-normal--34-240-100-100-p-170-iso8859-1
-adobe-times-bold-i-normal--8-80-75-75-p-47-iso8859-1
-adobe-times-bold-r-normal--0-0-100-100-p-0-iso8859-1
-adobe-times-bold-r-normal--0-0-75-75-p-0-iso8859-1
-adobe-times-bold-r-normal--10-100-75-75-p-57-iso8859-1
-adobe-times-bold-r-normal--11-80-100-100-p-57-iso8859-1
-adobe-times-bold-r-normal--12-120-75-75-p-67-iso8859-1
-adobe-times-bold-r-normal--14-100-100-100-p-76-iso8859-1
-adobe-times-bold-r-normal--14-140-75-75-p-77-iso8859-1
-adobe-times-bold-r-normal--17-120-100-100-p-88-iso8859-1
-adobe-times-bold-r-normal--18-180-75-75-p-99-iso8859-1
-adobe-times-bold-r-normal--20-140-100-100-p-100-iso8859-1
-adobe-times-bold-r-normal--24-240-75-75-p-132-iso8859-1
-adobe-times-bold-r-normal--25-180-100-100-p-132-iso8859-1
-adobe-times-bold-r-normal--34-240-100-100-p-177-iso8859-1
-adobe-times-bold-r-normal--8-80-75-75-p-47-iso8859-1

(Obviously there are many more than these.  But I think the whole
list is a bit long to mail to everyone.)

In short, it's hard for me to tell you that you're going to reliably
get any particular set of fonts on X11.

   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.

Something like this is doable.  I can get the size of each character,
and I can read the off-screen buffer back.

But I'm not sure how to scale something.  For example, take this 5x7:

  x
 x x
x   x
xxxxx
x   x
x   x
x   x

So how do we convert that to a 6x8?  I suppose we could duplicate the
middle row and column, like this:

  xx
 x  x
x    x
xxxxxx
xxxxxx
x    x
x    x
x    x

But I think the 5x7 looks better than the 6x8 with this algorithm.

Received on Monday, 21 July 1997 19:50:31 UTC