evan_tech

Previous Entry Share Next Entry
11:28 am, 23 Apr 06

dpi

Most software these days is designed in a way where pixels matter: the border on the text box I'm typing in right now is one pixel wide, most screen fonts (especially on Windows) has stems that are a pixel wide, etc. OS X has done an admirable job in getting away from this, using larger icons and getting our eyes accustomed to wider-stem fonts. But then there's the web, where it's even worse: for all the talk about avoiding pixel-based layouts, we still use images that are sized for one screen size and pixels still leak in everywhere, like in CSS style rules for borders.

As I understand it, it is because of this, and not because of display technology limitations, that displays have mostly remained at the same DPI (around 100) for years. (In the past, Raph Levien has written some interesting things about high-DPI displays: they exist, but they're expensive and uncommon.) I remember getting a big CRT for my mom, and then seeing her set the resolution down to 800x600 'cause otherwise the icons were too small. These days, LCDs have a fixed DPI so you're basically stuck with whatever DPI you're given. (Though this is not completely true: my mom changed the res down on her laptop as well -- she accepts the fuzziness as a lesser evil than things being too small to see.)

All of that is lead-in to note that my laptop (Thinkpad T41p, pretty good (if generic) piece of hardware) has a screen that is about 120dpi, which is just a little bit too much. Now all of these single-pixel-wide fonts are 5/6ths of their "normal" size and it's just past the edge of discomfort for me.

You can tell X about your display DPI: in your "Monitor" section add a line like
DisplaySize x y
where the sizes are in millimeters. This then propagates onwards, so you can confirm it with something like:
xdpyinfo | grep resolution
resolution: 124x124 dots per inch

You might have to change /etc/X11/xinit/xserverrc if it has a hard-coded DPI in it, too.

Unfortunately, lots of software is poorly-written with respect to DPI settings (see Debian bug 237877 for a discussion of this, with an uncharactaristically polite and sensible response from Branden Robinson). I don't especially blame the software authors: they just tweak things until it looks "right" to them, and you see the same phenomenon in bad Windows apps that don't use DLUs properly. Anyway, sometimes it'll take some more futzing to get things to look "right", especially if you're using stuff that targets X directly instead of through an intermediate layer (GTK, QT).

And ultimately it still doesn't look right, because the whole point in upping your DPI is to tell things that to get a "normal" sized font they need to make things slightly bigger in terms of pixels. So the fonts on my laptop now look... well, ugly isn't quite the right word, but that's the initial reaction I had to it. It's not that they're rendering improperly, it's just that they don't look right. Maybe you've experienced the phenomenon if you've ever played with the "large fonts" settings in Windows. I suspect the problem is a few things:
  • One is that I really just want the stems to be 20% wider, not twice as wide as they are now. (The display can't support that, of course.)
  • Another is that apps still aren't quite right. For example, Gnome itself recommends spacing widgets in multiples of 6 pixels, which means again that everything is just slightly too close together.
  • The final, and hardest thing to overcome, is just infamiliarity. OS X fonts looked gigantic initially, but then everyone got used to it and realized it looks good. It helped that everything else was different, too.


A nice solution to this problem would be to get a 200dpi display. Then, for image-based websites I could just double the resolution of everything in each dimension. Unfortunately, I don't have such a display, and the Firefox zoom support (which is designed to address exactly this issue) isn't quite there yet, and I'd expect it to be slow anyway on unaccelerated graphics hardware.