Re: Making pt a non-physical unit

On Mon, Jan 18, 2010 at 6:04 PM, David Singer <singer@apple.com> wrote:
> I am following the discussion, and I suspect that I should be changing the summary I wrote, but I am unable to tell how.  Would someone else like to edit the previous summary?
>
> Here it is, adjusted for the typo and the one change I did understand...
>
> * * *
>
> All CSS units have a fixed relationship to each other:  there are 96 CSS pixels to the CSS inch, 72 CSS points to the CSS inch, 2.54 CSS mm to the CSS inch, and so on.
>
> It is suggested that a CSS pixel be an integer number of device pixels, particularly if the ratio of CSS pixel to device pixel size is small.
>
> A CSS pixel normally subtends an angle of XXX (insert CSS 2.1 text here) at the eye when viewed at a normal arm's length distance.
>
> Manufacturers may choose how these units map to their device, and may also offer users control over the mapping.
>
> In print media, the CSS inch should generally map to a true inch on the printed surface.  Printers generally have a higher resolution than 96 dpi, so a CSS pixel is therefore typically larger than a device pixel.
>
> In screen media, a CSS pixel is often (recommended to be?) one or more device pixels, subtending the angle given above at the eye when viewed from the expected viewing distance.  For 96 dpi computer displays read at a normal viewing distance, both CSS pixel and CSS inch may map to their true counterparts.  For small high-resolution displays intended for 'close up' viewing, this means that a CSS pixel may map to a device pixel and that a CSS inch may be smaller than a physical inch on the screen, and for large displays intended for distant viewing, a CSS inch may be larger than a physical inch.
>
> In electronic 'billboard' displays, a CSS inch may be much larger, therefore, than a physical inch, so that a CSS pixel subtends the expected angle at the eye for the typical viewer.
>
> * * * *

I have an action on me to summarize the discussion, but this is pretty
much precisely correct.  I can only add a few things.

One, both Webkit and IE already treat 1pt as 4/3px; that is, they
already follow this proposal exactly.  I couldn't easily find Opera's
behavior listed in the thread.  Firefox currently treats pt as a real
physical unit as much as it can, but wants to switch to the 4/3px
measurement.

Two, Brad has suggested a slightly different take on the matter, that
ends up having the same effect.  For screen media, still use the ratio
of 96px to the in, as suggested here.  However, he suggests mapping 1
css pixel to 1 device pixel, and then assuming a >1 zoom value for all
elements by default when the dpi is high enough.  The only noticeable
difference is that in Brad's suggestion the author could easily get
access to device pixels in an element by setting zoom:1 on it.

~TJ

Received on Wednesday, 20 January 2010 05:32:49 UTC