Resolution indpendence

Glynn Clements glynn at gclements.plus.com
Mon Jun 30 13:05:12 PDT 2008


Steven J Newbury wrote:

> > No, because everyone except desktop publishers deals in a standard,
> > well-understood set of point sizes, which they expect to translate at
> > about 96dpi, instead of maybe reallyreallytiny or LUDICROUSLY BIG.
> 
> I really don't understand this argument.  Surely this is only the case
> because most people use 1024x768:
> [ http://www.onestat.com/html/aboutus_pressbox51_screen_resolutions_internet.html ]
> 
> Yes, that's right, most people set the resolution of their display to a
> value lower than the display hw optimimum so that text (and image) sizes
> are what they are accustomed to. Most(!) people work around the fact the
> 96dpi hack by adujsting the resolution!

Yep. Because that actually works better than selecting the 120 dpi
option and using a higher resolution.

The DPI setting only affects fonts, so with the 1280x1024 at 120dpi
option, the icons are too small, borders and dividers are too small,
etc.

To make 1280x1024 at 120dpi look exactly like 1024x768 at 96dpi, just with
higher-quality, you would need to either provide another version of
every icon, or you would have to tolerate rescaled icons.

If the original icons are 16x16 pixels, the higher resolution versions
need to be 20x21.33. And what you do about the extra 0.33 pixel is far
from straightforward.

You also have to figure out how to make marquees etc 1.2 pixels wide
instead of 1 pixel wide.

> > I'd be more than happy for everything to be redesignated as 'size'
> > rather than points, because as you say, it stops the conflation of the
> > two use cases.  One use case involves people who just want to use their
> > computer and have it behave as they expect.  The other involve people
> > who get very upset when their computer behaves in a manner that's not
> > completely in accordance with certain rigid principles.
> 
> I'm sorry, but computers *should* act in accordance with rigid priciples
> otherwise what's the point?  That's why we have standards, no?

The interface between software components needs to be rigid, but the
interface between the computer and a human less so. Users are normally
asking for more DWIM, not less.

[Much of the time, it's because they don't really understand the
consequences of what they're asking for, and wouldn't like it if they
got it. But that's not always the case.]

> > > They're only in fundamental opposition because some people insist in
> > > abusing physical scaling to change font sizes instead of
> > > (revolutionnary idea) just specifying different size defaults
> > 
> > Look, I'm happy that you care about this stuff.  Really, because we need
> > more people to tell us that we're screwing up and going wrong.  But
> > please trust me that real people don't feel that way.  They see 'size
> > 12' (something readable), rather than '12pt' (however many inches).
> > Nothing that exists today works at all with high-density displays -- the
> > Nokia tablets still just always smash the DPI to 96 or so, because
> > surprisingly you have NO ROOM ON YOUR SCREEN AT 220DPI BECAUSE
> > EVERYTHING IS REALLY BIG AND JUST IMAGINE THIS BIT IS TAKING UP THIRTEEN
> > LINES RATHER THAN JUST BEING IN CAPS.  It's ridiculous.
> 
> This just makes no sense.  If the true DPI is 220 on a decent size
> screen, text at 12pt will be unreadable by most if the system DPI is
> fixed to 96!  It will only give the expected (readable) result by either
> setting a lower screen resolution or by using the true DPI to render the
> text!

If the true resolution is 220 dpi, you will likely get the best
overall results by pretending that it's 192 dpi, i.e. *exactly* twice
96 dpi[1]. The difference between 192 and 220 is just under 15%, which
is noticable but not critical, but you can then rescale everything by
exactly 2:1.

Fonts actually get rendered at twice the resolution (or, if you have a
hand-tuned bitmap designed for 24pt @ 96dpi, you would use the same
bitmap for 12pt @ 192dpi), while icons just have every pixel drawn as
a 2x2 pixel square. No blurring, no jaggies.

The end result is likely to be a lot nicer than if you insist on
treating point sizes as sacrosanct, scaling everything by exactly
2.291666:1 (220:96).

[1] This assumes Windows. For X, you would pretend that it's 225 dpi,
i.e. exactly triple 75 dpi. That's an error of ~2.3%. It's doubtful
whether that's even noticable; it's certainly not critical.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list