Pixel densities (was RE: Best practice for font control)

<blockquote
cite="http://www.w3.org/TR/REC-CSS2/syndata.html#length-units">
Pixel units are relative to the resolution of the viewing device, i.e.,
most often a computer display. If the pixel density of the output device
is very different from that of a typical computer display, the user agent
should rescale pixel values. It is recommended that the reference pixel be
the visual angle of one pixel on a device with a pixel density of 90dpi
and a distance from the reader of an arm's length. For a nominal arm's
length of 28 inches, the visual angle is therefore about 0.0227 degrees.
For reading at arm's length, 1px thus corresponds to about 0.28 mm (1/90
inch). When printed on a laser printer, meant for reading at a little less
than arm's length (55 cm, 21 inches), 1px is about 0.21 mm. On a 300
dots-per-inch (dpi) printer, that may be rounded up to 3 dots (0.25 mm);
on a 600 dpi printer, it can be rounded to 5 dots.
The two images below illustrate the effect of viewing distance on the size
of a pixel and the effect of a device's resolution. In the first image, a
reading distance of 71 cm (28 inch) results in a px of 0.28 mm, while a
reading distance of 3.5 m (12 feet) requires a px of 1.4 mm.
   [D]
In the second image, an area of 1px by 1px is covered by a single dot in a
low-resolution device (a computer screen), while the same area is covered
by 16 dots in a higher resolution device (such as a 400 dpi laser
printer).
</blockquote>

Should read:
<blockquote>
Pixel units are relative to the resolution of the viewing device, i.e.,
most often a computer display. If the visual angle of a single pixel on
the output differs from that of a typical computer display, the user agent
should rescale pixel values. It is recommended that the reference pixel be
the visual angle of one pixel on a device with a pixel density of 90ppi
and a distance from the reader of an arm's length. For a nominal arm's
length of 28 inches, the visual angle is therefore 1/(28*90) = 1/2520
radians (i.e., s=r&theta; &theta =s/r, r = 28 inches, s = a pixel, 90ppi,
so s=1/90 inches, so &theta; = 1/2520 radians).
When printed on a 300 dpi laser printer, meant for reading at a little
less than arm's length (21 inches), the visual angle is 1/(21*300) =
1/6300 radians. As a result, a calculated length of (e.g.) 18px is
converted to 18(reference angle)/(device angle). A more general formula is
provided by (device pixels)=(requested number of pixels)(device's viewing
distance in inches)(device's ppi)/2520.

Although browsers in theory should ALWAYS rescale pixel values, they
should not do so if they lack the required information (viz. viewing
distance and ppi value [Note that ppi values are determined by the
resolution and physical dimensions of the monitor, and should not be
confused with operating systems' inch-to-pixel conversion factors
(typically 96ppi or 72ppi), which are commonly quoted as ppi figures). In
addition, browsers should not perform conversion if (as is inevitable) the
task is performed by a printer driver.
</blockquote>

These changes address a number of problems with the old spec:

1. 'very different' is too vague - pixel values should always be rescaled,
but rarely will be, since browsers unfortunately usually lack the required
information 
2. the level of rounding that it suggested
3. it did not point out that browsers do not usually perform print
drivers' tasks
4. it did not point out that it is rare that a browser can actually
perform a useful conversion task (I can only really envisage it being
possible on Web TVs or handheld devices where the browser is supplied with
the machine)

In addition, I would recommend a visual angle of 1/2380 rad, since 85ppi
is  more typical for a  computer display (although I'm sure the 'Windows
is best' mindset will triumph).

 

=====
----------------------------------------------------------
From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Received on Wednesday, 26 January 2000 04:12:59 UTC