Re: Making pt a non-physical unit

On Thu, Jan 14, 2010 at 2:02 AM, Robert O'Callahan <robert@ocallahan.org> wrote:
> On Thu, Jan 14, 2010 at 1:01 PM, David Singer <singer@apple.com> wrote:
>>
>> I think the suggestion on the table is:
>>
>> A CSS pixel is defined in section 4.3.2 of
>> <http://www.w3.org/TR/CSS21/syndata.html#length-units>, as a square
>> containing an integer number of device pixels that, when viewed with a zoom
>> setting of 1:1, subtends an angle at the eye most closely matching the angle
>> subtended at the eye by 1/96 of an inch viewed from a distance of 28 inches.
>>  (What happens if device pixels are non-square, as happens on TV?  Is it an
>> integer number in the horizontal direction?)
>>
>> We then define that a CSS inch is exactly 96 CSS pixels, that there are 72
>> CSS points to the CSS inch, 2.54 CSS mm, and so on. All the physical units
>> relate on this notional viewing surface.
>>
>> We don't give access to true dimensions on the display surface (because
>> not all displays have a well-defined surface, and for electronic and paper
>> billboards the numbers would be really large, and so on). We don't give
>> access to true pixels (because it's useless unless you either or both of the
>> number of true pixels per true inch, or true pixels per CSS inch).
>>
>> I don't know if my colleagues agree, but I think this works for any
>> display system - paper, screen, projected, etc.  It allows manufacturers to
>> adjust based on expected or actual viewing distance.  Zoom is a separated
>> question (yes, if the user asks for a 2:1 zoom, then things should look
>> twice as large as at 1:1 zoom, surprise).
>>
>> The question is...does this 'work'?
>>
>
> Almost, but not quite.
>
> Our experience is that users do not expect the size of a CSS pixel to be
> different from one screen pixel by default. They do expect that content such
> as form controls will be displayed consistently inside the browser and
> outside it. Therefore attempts to automatically have CSS pixels approximate
> a particular subtended angle (which we have tried) are not appealing. Making
> CSS pixels different from screen pixels is something users should opt into,
> preferably via a system-wide setting that affects the appearance of all
> applications (e.g., "UI scaling" on Mac). So the spec needs to permit such
> an approach.

I think that, in the wording expressed by David Singer, this is
'allowed' in the sense that the UA can 'cheat' by assuming that a
hi-res monitor will be looked at closer than a low-res monitor (which
is not too far from the truth: it surely holds for handhelds vs
monitors, but also for monitors with a hi res and kept at a 96dpi, the
standard font sizes being so small to require the users to either get
closer to the surface or use a different zoom level).

> 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. Exceptional circumstances like
> printing massive billboards would be ... excepted. And for screen media I
> think we still have the use-cases of touch interfaces and "life size"
> diagrams which deserve a "true" unit.

The question is, should the UA be left at guessing when the 'true'
unit can/should be used, or should this be left in the hands of the
designer? In the latter case, do we want to introduce truein, truemm,
etc or would it be enough to have some kind of at-rule or directive
that specifies that lengths are true, physical lengths rather than
logical?

In the latter case, I was thinking about something along the lines of
a directive reference-length that takes a unit of measure as argument.
This would default to reference-length: px; for screen media,
reference-length: in for print media.
This could be extended to a syntax reference-length: css-length =
true-length. For example, reference-length: 1in = 12in would mean that
everything should be rendered so that 1 CSS inch covers a foot on the
actual medium (to the best of the UA knowledge), while preserving the
relationships between (CSS) px, pt, in, mm etc.
Notice that for a computer monitor with a dpi known to the UA,
reference-length: 1px = 1px (shortened to reference-length: px) and
reference-length: 1in = 1in (shortened to reference-length: in) would
give different results, as in the former case you'd get 1px = 1
monitor pixel, while in the latter you'd have 1px = 1/96 physical
inch.

How does _this_ sound?



-- 
Giuseppe "Oblomov" Bilotta

Received on Thursday, 14 January 2010 08:06:37 UTC