Monday, June 9, 2008

Fixing DPI changes in Linux

(or, how to enforce a constant DPI)

Lately, I found that repeatedly enabling and disabling an external monitor for my laptop caused the fonts to get smaller and smaller. It appears this was linked to the DPI getting changed somehow. With a bit of hunting, I found the following useful bit of info:

"...some distributions launch X using "-dpi 100". Fonts will appear as intended..."
(http://scanline.ca/dpi/)

Indeed, adding -dpi 100 to defaultserverargs in /usr/bin/startx did the trick. (At least for now...we'll see if it holds.)

No comments: