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

Re: Making pt a non-physical unit

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 14 Jan 2010 18:26:45 -0600
Message-ID: <dd0fbad1001141626y3d113cfev1841b2c86b29a98d@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: robert@ocallahan.org, www-style <www-style@w3.org>
On Thu, Jan 14, 2010 at 12:38 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> As an evil idiot author, I feel much of the value of high resolution
> monitors would be wasted if I cannot e.g. draw a border that is one device
> pixel in width while still maintaining the proportion between that 1px
> measure and other measures.

If you know that your output device is high-enough resolution to have
something like mapping 1 CSS px to 2x2 device pixels, you can always
draw a border with .5px width.  Alternately, if that use-case is
really determined to be important as we move into the future of higher
definition screens, the hairline unit people keep mentioning can be
employed (defined as "the minimum number of device pixels necessary to
draw a line that is visible to the human eye at standard viewing

>> Also, I think we have use cases for true dimensions. We might as well
>> ensure that 1px is 1/96 of an inch when printed, so that CSS absolute length
>> units take their expected values when printing.
> Right. Just as a device pixel is unambiguous on a monitor, but an inch is
> not, the situation is reversed in print. If I print to a PDF file, I can
> tell it to make something exactly one inch, but 1px has to be approximated
> (because device pixels are not too useful of a measure in high resolution
> printing; they vary too much between output devices).

Yeah, I agree, and I think most of the working group did too.
Printing in ordinary situations (on normal paper, frex) should follow
physical units exactly.  Scaling should of course scale the physical
units, and exceptional circumstances such as printing on poster-size
paper should also potentially be treated as zooming (up to the program
doing the printing - if it designs with the *intention* of being
printed that large, it of course probably makes sense to respect
physical units exactly).

>> Exceptional circumstances like printing massive billboards would be ...
>> excepted.
> I disagree (ah, order is restored to the universe). If I create a PDF or
> Postscript file in which the design is 20 inches wide, then there is nothing
> exceptional about that. If I hand that file to a billboard company and tell
> them to print it at a ratio of one inch to one foot (or even if I do it
> myself by setting "1200%" in the print dialog box), then that is outside the
> purview of CSS. The scaling is more or less equivalent to zoom.
> If I, on the other hand, design my layout to be 20 feet wide, then there
> still need be no exception, as long as the output device can handle
> rasterizing that many dots, and the print driver doesn't freak out.
> If I am designing a (different) billboard with a DIV that is 240in wide, and
> then set a border on it that is 1px wide (1/96in), then I will quickly
> discover what an idiot I am (and probably already did, long ago), because
> the border will not be visible from a car driving by. But if I design
> something that later is to be scaled by 24x, then I can make my DIV 10in
> wide with a 1px border, and get very predictable results when that
> pre-scaled (pre-zoomed) border is 1/96in.

Pretty sure I agree with you here.  If the application intends to
design at that scale from the start, then physical units should be
real, and px should keep their standard ratio of 96 to the inch.  If
the application is designing something at normal scale which is then
scaled up to billboard size, then all of this is still true, but the
printing-as-a-billboard is a zoom, which scales up all units equally.

Received on Friday, 15 January 2010 00:27:37 UTC

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