Re: [CSS21] Issue 149 - px vs. pt

On Jun 29, 2010, at 12:27 , Robert O'Callahan wrote:

> On Wed, Jun 30, 2010 at 4:56 AM, David Singer <singer@apple.com> wrote:
> The problem comes when you have a device with say 300dpi.  If you want 96 px/in, and CSS pixels are an integer number of device pixels, then you have to pick 3:1 for that ratio, which results in a CSS inch being 288 (3*96) device pixels, which is about 4% short of a true inch.  Basically, something has to give:
> * 96 CSS px/in
> * integer relationship
> * true measurements
> 
> If you anchor in true measurements, and the 96 px/in is inviolable, then it has to be the integer relationship that gives.  I think in print media in particular, people expect inches to be inches, not 4% wrong.
>  
> The best approach would depend on the details of the device.
> 
> For genuine printing, even at 300dpi you don't get sharp-edged pixels because of effects like ink bleeding, and you don't care about the performance impact of non-pixel-aligned drawing, so there is no reason to make 1px is an integer number of ink dots; you would prefer to make 1in be a physical inch.

right, you go choice (a) the physical length units (inch, cm ertc.) are your anchor
> 
> On the other hand, on a 300dpi LCD screen you would probably want to make 1px 3 screen pixels.

right, you go choice (b), the reference pixel (a multiple of the device pixels) is your anchor.

> 
> Rob
> -- 
> "He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]

David Singer
Multimedia and Software Standards, Apple Inc.

Received on Tuesday, 29 June 2010 22:11:39 UTC