4 ms·
> In most cases, you have to factor in the distance to > the viewer. This is, probably "projection angle in the > retina" is a more useful invariant.
by munificent 9y ago
> In most cases, you have to factor in the distance to
> the viewer. This is, probably "projection angle in the
> retina" is a more useful invariant.
That's actually exactly what CSS specifies:
"The reference pixel is the visual angle of one pixel on a device with a pixel density of 96dpi and a distance from the reader of an arm's length. For a nominal arm's length of 28 inches, the visual angle is therefore about 0.0213 degrees. For reading at arm's length, 1px thus corresponds to about 0.26 mm (1/96 inch)."
Of course this means "pixel" is kind of a misnomer, but at least the semantics of the unit are about what you want.
- gsnedders 9y agoNote that there's slightly more choice here than just that: 1px may be either (1 physical real-world inch on the output medium)/96 or set related to the reference pixel. (Though in CSS 1in always equals 96px, etc.) (See https://drafts.csswg.org/css-values-4/#absolute-lengths https://drafts.csswg.org/css-values-4/#absolute-lengths)
- c-smile 9y agoWhat is written in CSS specification may work only if CSS has any means to measure distance of observer from display surface. Like @media distance(1m) {} Otherwise it is just a good wish like "hope you have normal eyesight". The only information that is available to CSS is that it gets rendered on some media. And so 100mm shall be 100mm measured by the ruler on that media surface. Monitor or printer. Dot. No other options.
- kijin 9y agoPhones already have proximity sensors and facial recognition. We're just not using them to scale pixels yet. But for most intents and purposes, it's enough to assume a "typical" distance for the type of device in question. People with bad eyesight are free to place the device closer to their eyes, zoom in, or adjust a system setting that makes everything look larger.
- zAy0LfpBZLC8mAC 9y ago> And so 100mm shall be 100mm measured by the ruler on that media surface. Monitor or printer. Dot. No other options. So, you connect a projector to your laptop, point it at a 20 m screen, open a web page, and then ... the browser has to scale the web page to a width of 10 pixels without any options to adjust things for the user?
- gweinberg 9y agoThe projector is a great example. The projector generally will know neither how far the projector itself is from the screen nor how far the viewers will be. So specifying how large the type should be on the screen in inches is obviously not a useful thing to do.
- mjevans 9y agoGenerally 'as large as possible' is the best answer for this case...
- dgreensp 9y agoExactly. It doesn’t make sense to talk about this topic without reading and understanding that spec first. The “px” unit has already been virtualized. It’s already based on visual angle (or the idea of visual angle), and notably not absolute display distance (because of TVs, projectors, and now VR goggles).