Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ironically there is a straightforward answer: arc distance. What angle does the font (or pixel, or whatever you're trying to scale) subtend from the position of your eye? This works always. It's sometimes hard to define for some devices (e.g. TV's, which might be used a widely varying distances), but even then the world has come up with standard conventions (e.g. assume you're 10' from your 40" TV, assume your phone is about 12" away, assume the controls in your car are at a 30" arm length...).

And, of course, it's not implemented anywhere. So we all suffer with "dpi" and "px".



According to CSS 2.1, px _should_ be defined in terms of an angle: http://inamidst.com/stuff/notes/csspx.


That's fun. Obviously that's not how it works, 1px is 1 physical pixel everywhere I've ever seen. Think of how much would break if something decided to do this "right" ...


On retina displays it is two pixels.


I haven't paid too much attention to this but shouldn't it be a square of four pixels? That would be true double resolution, right?

Or is there some pixel trickery like those olpc displays? [http://wiki.laptop.org/go/Display]


px is a measure of length, not area.

A 12 px high font is 24 px high on a retina display.

A 12 px by 12 px box is 144 px^2, or 12 x 12 x 2 x 2 = 576 px^2 on retina.


This works for head-mounted/heads-up displays, too, making it somewhat more future-proof.


Thanks for giving me yet something else tocurse browsers for.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: