Re: Dynamic Font Size

----- Original Message -----
From: Christian Davén <christian.daven@home.se>
To: <www-html@w3.org>
Sent: Monday, March 22, 1999 4:00 PM
Subject: Dynamic Font Size


> Which is the better way of specifying the font size when you want the text
> to have the same size on a Mac as on a PC (as well as different
> resolutions)?

Different monitors have different viewable display sizes, and of course
resolution can vary, resulting in immensely varying pixel density. That
said, the CSS spec recommends, but does not require, that output devices
with a pixel density significantly different from 90 pixels-per-inch rescale
their pixels to that density for the purpose of pixel measurements.

> By using 'pt' or 'px'? And does the same apply to margins?

So the answer to your question is, "maybe pixels." But on a high pixel
density display where pixel values are not rescaled, your text may be too
small. On the other hand, if pixel values *are* being rescaled, your fonts
could be the right size, but look jagged (unless font anti-aliasing is
prepared to cope with this).

Points and other physical measurements are never appropriate for screen
media because they will rasterize differently depending on the pixel-density
of the display. This can potentially result in unreadable text.

And yes, basically the same applies to margins.

Rather than obsessing over ensuring your fonts are exactly the same size
everywhere, it is a better idea to use relative measurements like em and
percentage. That way, you can be sure (buggy browsers notwithstanding) that
the font is the same size *relative to the user's preferred font size*
everywhere.

Braden

Received on Tuesday, 23 March 1999 04:34:23 UTC