2 ms·
Browsers should provide to websites the user's (typical) distance to the eye, and preferred zoom level. Maybe also the preferred type of input, to tell mouse us
by aasasd 6y ago
Browsers should provide to websites the user's (typical) distance to the eye, and preferred zoom level. Maybe also the preferred type of input, to tell mouse users from finger users.
Obviously pixel count and screen ratio is complete nonsense, in this almost-glorious day of sweet variety of gadgetry. It will only become more of a nonsense, until we all switch to neural interfaces.
But since designers only have what CSS&JS provide, they cling to the pixel count and DPI, choose a font size according to someone's eyesight, and stick to that. This is bogus, and leads to fonts from something like two mm in height (ahem HN cough) to almost a centimeter, so I either have to stick my nose to the phone screen, or hold the phone at a full arm length and scroll like mad. And browser zoom is no help in this model.
Meanwhile, in the real world, all that matters is the visual angle of the font or image, and the user's eyesight. The first is dictated by the distance from the screen, and the second determines how much the content must be zoomed in from the perfect-vision scenario. In fact, since I wouldn't want the content to grow and shrink when I move my arm somewhat or lay back in the chair, perhaps devices could use some default visual-angle values according to their form-factor and typical usage, then adjust for the user's chosen zoom level, and report only one value to websites: either preferred visual angle, or zoom level from some global anchor value—whichever of the two is better to use for calculations.
With this info, the screen's pixel resolution affects only one consideration: whether a given line of text or other content would fit in the screen horizontally at the preferred visual ratio—or it must be broken or scrolled.