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: Tue, 12 Jan 2010 09:23:52 +0100
Message-ID: <cb7bb73a1001120023n167e036bi2267f7befe9ff084@mail.gmail.com>
To: "Linss, Peter" <peter.linss@hp.com>
Cc: www-style W3C Group <www-style@w3.org>
On Tue, Jan 12, 2010 at 12:04 AM, Linss, Peter <peter.linss@hp.com> wrote:
> I will vigorously oppose any change that makes points anything other than 1/72 of an inch (unless we really want to get pedantic and correct it to the Truchet definition from the 1600s of 15625/833118mm, ok, not really).
> I accept that the px unit was doomed from the start and I'm OK with having px defined to be 1/96th of an inch just to provide some sanity for the installed base. This will by definition set the ratio between px and all other physical units as we're not going to allow well established ratios of units to change.
> Now, how CSS units map to real-world physical units is something that simply has to be handled on a per-media, per-device basis by the UA. For interoperability sake, it makes sense to have a defined algorithm to use when 1:1 physical mapping is unavailable (or unwise). For certain media, like print, there's no good reason that it should be anything other than 1:1. For screen devices, if the environment has a reliable mechanism that allows the UA to determine how many device pixels map to real world units, then sure, go for it, otherwise use the algorithm. (For the record, I don't consider Windows to be in this category, I'm thinking at this point this may be limited to devices like e-readers.)

Note that for some extreme cases of print media it might make sense to
have a non-1:1 relation between logical and physical. A poster or ad,
for example, might be created from a standard CSS by having 1
'logical' inch correspond to a 1ft or whatever. More about this later.

The proposal to consider the difference between logical and physical
units could be standardized in CSS by rewriting and expanding the
discussion about the "reference pixel".

The ratio between logical and true physical units would be influenced
by factors such as monitor resolution, assumed viewing distance, zoom
level, etc. Lacking information, these would be assumed to be at a 1:1
ratio (at the default zoom level), using whatever reference is
available from the (visual) media: screen pixel for monitor display,
printer metrics for print media, etc.

The current CSS absolute lengths would keep their description, with
the additional specification that they are _logical_ units of length.
Additionally, px would be made into a logical absolute length too,
equal to 1/96in. The rewritten discussion about the reference pixel
would be de facto equivalent to what the current standard commands.

Additionally, CSS could introduce the proposed true physical units
(truept, truein, truecm, etc) which ought to be rendered, to the best
of the UA knowledge, as the actual given lengths measured _on the
physical object_. (Thus, a poster-specific CSS could use true physical
units and express lengths in feet, etc). An important point about
these units is that they would NOT be influenced by zoom levels.

Of course, the "to the best of the UA knowledge" means that, lacking
other information, a 1:1 ratio ought to be assumed when no knowledge
is given, a fallback that could be used also when 'true physical'
"doesn't make sense" (glasses, for example). A recommendation of the
CSS spec could be to only use 'true physical' units where they (1)
make sense _and_ (2) are absolutely necessary.

The question at this point would be whether a 'truepx' should be
introduced as well, and whether it should be equal to 1/96truein or
rather the smallest representable physical unit on the device (single
screen pixel, single printer dot, etc).

How does this proposal sound?

Giuseppe "Oblomov" Bilotta
Received on Tuesday, 12 January 2010 08:24:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:31 UTC