W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: Making pt a non-physical unit

From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date: Thu, 7 Jan 2010 10:16:28 +0100
Message-ID: <cb7bb73a1001070116t3b159ca4l2c8600b30f212727@mail.gmail.com>
To: Jonathan Kew <jonathan@jfkew.plus.com>
Cc: www-style mailing list <www-style@w3.org>, "Robert O'Callahan" <robert@ocallahan.org>
On Thu, Jan 7, 2010 at 1:10 AM, Jonathan Kew <jonathan@jfkew.plus.com> wrote:
> On 6 Jan 2010, at 23:53, Robert O'Callahan wrote:
>
>> On Thu, Jan 7, 2010 at 12:47 PM, Jonathan Kew <jonathan@jfkew.plus.com> wrote:
>>> If we're going to give up the "physical" meaning of pt, and redefine it as 4/3px, then I suggest that we should - for the sake of consistency and designers' sanity - redefine all the "physical" units in the same way, so that 1in remains 72pt, etc. So pc, in, cm, mm, and perhaps a few others (I haven't checked the list) will all change in a coherent way.

I actually like this approach. Basically, this would be akin to fixing
px = 3/4pt, but instead of starting at a zoom level of actual/96dpi,
base screen rendering would be at 1pixel=1px, solving all the issues
mentioned by Robert O'Callahan, both regarding performance and
interaction with the operating system (controls, UI inconsistency,
etc). Additionally, aside from layout liquidity (how many web pages
actually still make use of that, though?), the screen rendering would
be just a scaled version of the print rendering (assuming the same
stylesheet, obviously).

> What troubles me about this is the inconsistency it creates between CSS units and the "real world". If these were arbitrary keywords invented purely for CSS, it would be somewhat more acceptable, but pt, pc, in, cm, mm are long-established real-world units with well-known relationships in designers' minds, and it seems fundamentally wrong to redefine them in CSS in such a way as to break that model.

I think that the relation between them is much more important than
their connection to the 'real world' lengths, in the sense that as
long as you preserve the ratios between them, "real world" matching is
just a matter of zoom level. So it all comes down to choosing the
default zoom level to what makes the most sense for a particular
rendering.

Considering that the whole issue arises from the fact that web
designers are not particularly aware of the nature and behavior of
hi-res screens (esp. the handheld ones), I doubt they would notice a
UA choosing to scale everything so that 3/4pt match a pixel on their
screen.

> If we were to adopt this approach at all, my thinking is that we should do the full set of "true??" units for the sake of consistency, even if we think some of them (truepc, anyone?) will rarely be used. As for truept: I should be able to specify a touch-screen interface element as being 8 truemm high, and put some text inside it using a font-size of 14 truept.

'trueXX' units might not even be necessary, because for example a UA
could decide to do base rendering in actual inches (while still
preserving the px/pt ratio) on a touchscreen device.

Aside: In the TeX world, there's the notion of a 'magnification
factor'. All units start as real units (except that a pt is 1/72.27
rather than 1/72, which is known there as 'big point' or bp, and there
is no px, but rather the 'scaled point' sp which is 1/65536 of a pt,
the smallest unit in TeX), but setting a magnification factor alters
their rendering. This is important because a 1.2 magnificed scaled
10pt font might be different from a 12pt font. TeX also has 'trueXX'
units which are essentially the same as standard units, except that
they are not altered by the mag factor (they are usually used for
things such as the physical page dimensions).

If "trueXX" units are added to the spec, IMO it would make sense to
make them behave 'the TeX way', and make them immune to any form of
magnification and reduction, including zooming in and out of a page.
Of course the actual ability of UA to render them correctly on screen
depends heavily on the kind of information the UA can get from the o/s
about the rendering device itself, but this has already been
discussed.

My vote goes to moving px from being a relative to being an absolute
unit of measure, equal to 3/4pt. The 'what is a px' discussion in the
spec would obviously have to be edited too, mentioning that on low-res
devices such as monitor displays UA may opt to sacrifice, for
performance and quality reasons, "physical correctness" by matching a
px with a single device pixel, and scaling all other units
accordingly. (BTW, the 600dpi printer would then render a px linear
length as 6 dots, not 5).


-- 
Giuseppe "Oblomov" Bilotta
Received on Thursday, 7 January 2010 09:17:22 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:23 GMT