W3C home > Mailing lists > Public > www-style@w3.org > July 2000

Re: px vs. pt

From: Matthew Brealey <webmaster@richinstyle.com>
Date: Thu, 27 Jul 2000 11:33:49 +0100
Message-ID: <3980100D.BEC@richinstyle.com>
To: Rowland Shaw <Rowland.Shaw@seagatesoftware.com>
CC: www-style@w3.org
Rowland Shaw wrote:
> 
> > Rowland Shaw wrote:
> > > What are people's views on preference?? I've become embroiled in a
> couple of
> > > debates recently where people have been defending the good old "px"
> unit,
> > > which I think could be potentially dangerous (well, from the point of
> view
> > > of supporting people with large screens and the disabled)
> >
> > The archives of the comp.infosystems.www.authoring.stylesheets contain
> > extensive debates on this subject.
> 
> > > For reference, the units are defined as being:
> > > 1pt == 1/72 inch (device independent for physical size)
> > > 1px == 1 pixel   (device dependent for physical size)
> >
> > (No - see the belowcited URL)
> 
> I think you'll find that's how they're defined in the CSS 1 spec as:

[snip]

Quite possibly, but as explained at that URL, 1pt is not
device-independent, because the computer does not know what an inch is,
and therefore uses an arbitrary conversion factor, such as 72ppi. As I
explained there, whereas 1pt is 33% larger at 96ppi (e.g., Windows) than
72ppi (e.g., Mac) at the same resolution, 1px is the same on both
platforms.

> > > My personal preference would be to suggest using pt. (or pica or cm etc)
> >
> > I disagree strongly - see
> > http://richinstyle.com/masterclass/lengths.html
> 
> Pretty, but it is flawed by the fact you're example was/is using large fonts
> on a resolution intended for small fonts...

What?
Why?
How do you know?
 
> The size of a pixel is only *suggested* so cannot be guaranteed:
> "Pixel units...are relative to the resolution of the canvas, 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 UA should rescale
> pixel values. The suggested reference pixel is 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 about 0.0227 degrees"

That's actually irrelevant.

See:

http://lists.w3.org/Archives/Public/www-style/2000Jan/0196.html
http://lists.w3.org/Archives/Public/www-style/2000Jan/0199.html

and also the rest of the thread and its ancestor thread(s).
 
> > (Unfortunately most WYSIWYG tools do to - products such as Dreamweaver
> > and all Microsoft products use points).
> 
> They transfer to print nicely like that...

Just a shame about the overwhelming majority of people using screens -
eh?

And also, on a point of fact, pixels do translate well to print, since
they are rescaled (printers, unlike computers, have the required
information to do the necessary rescaling).

> IMHO, physical sizes should be used for root elements, and relative sizes
> (in em or ex) for all the others...

I hope not. This is the height of rudeness on the part of the designer -
by doing this he maximises the problems, causing difficulties reading
for the greatest number possible. To counter this it would be useful if
browsers did proper rescaling of fonts (zooms are unsatisfactory):

user without perfect sight sets font size in browser; e.g., 20px
user enables 'rescale fonts' option

Example:
rude developer creates page with font size of (say) 9pt. 

Browser rescales font size to 20/16 * 9 * 96/72 = 15px. 

Result: all accessibility problems caused by lazy/rude developers
disappear, and without the need for an annoying zoom feature (i.e. it's
automatic)

[Note there could be an 'advanced' dialogue box, where the figures I
suggest here (default font size, in pixels, of developer's computer (16)
and ppi value for that computer (96), which represent what most
developers/WYSIWYG editor makers use, could be changed.]

In fact, to rebut your suggestion, no size at all should be used for the
root element, and relative sizes for all others. By using no size for
the root element, you respect the user's wishes as to size, rather than
inflicting upon them a size that is smaller than they an read. (BTW,
please read the page: exes are a BAD idea for font sizes.)

-----------------------------------
Please visit http://RichInStyle.com. Featuring:
MySite: customizable styles.         AlwaysWork style 
Browser bug table covering all CSS2 with links to descriptions.
Lists of > 1000 browser bugs         Websafe Colorizer 
CSS2, CSS1 and HTML4 tutorials.      CSS masterclass 
CSS2 test suite: 5000++ tests and 300+ test pages.
Received on Thursday, 27 July 2000 06:34:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:05 GMT