Re: Making pt a non-physical unit

Boris Zbarsky:
> On 1/12/10 1:15 PM, Linss, Peter wrote:
>> Second, having "true" units does no one any good when the ratio  
>> from device pixels to real world physical units isn't reliably  
>> known. If it's known, then there's no reason why regular units  
>> can't be "true" units.
>
> The point (no pun intended) is that there is such a reason: doing  
> it is not compatible with most of the web content out there.

If we redefined only ‘pt’ (with 3pt = 4px) that reason basically  
vanishes.

The ‘pt’ replacement (e.g. Tex’s ‘bp’ or just ‘p’) and the other  
absolute units would then still be rendered physically correct when  
the physical viewport dimensions are known (e.g. @media print  
including PDF export, probably also handhelds). If they are unknown  
(@media screen) or unknowable (@media projection), which authors must  
avoid, I can think of several fallback solutions:
1. make 1bp = 1pt = 4/3px (i.e. “96dpi” resolution),
2a. assume a certain standard viewport, e.g. about 30cm = 12in high  
(i.e. portrait A4, landscape A3; 19"@5:4, 20"@4:3, 22"@8:5, 24"@16:9  
screen diameters), and know its logical dimensions of course,
2b. like 2a, but also apply media specific magnification (e.g. 1  
@media screen, 2 @media [hd]tv, 5 @media projection),
3. any better algorithm someone comes up with.

That is basically what Robert O'Callahan wrote earlier, only with an  
algorithm defined in the specification:

> We can redefine these units so that an absolute length unit gets  
> that exact length when printed on "normal paper" --- material  
> intended to be held when read --- and let browsers choose the best  
> way to display these lengths on-screen, based the device  
> characteristics and user settings,

---8<---

>> I do see a use case for a device pixel unit,

Which would be called ‘pel’ or ‘dot’, I guess.

We could also lessen the resolution and distance dependence of ‘px’,  
instead allowing the true angular units ‘deg’ etc., which were once  
introduced for aural stylesheets. Nobody would implement them  
correctly though.

>> but it still scares me as it's ripe for abuse and will likely be  
>> misunderstood.

‘Minimum dot size’ setting anyone?

Received on Tuesday, 12 January 2010 23:10:07 UTC