[CentOS] Q about dpi, fonts, gnome, Xorg etc

Mon Jan 10 03:23:16 UTC 2011
Bob Hepple <bhepple at promptu.com>

This has been puzzling me for some time and despite bothering Auntie
Google rather a lot, I've yet to find a satisfying answer.

As an old-time (since 1981) unix and X guy, I've generally been fairly
well-able to get fonts to behave in a rational manner. My needs are
pretty simple - I just want 8-point (or 9-point etc) fonts to appear on
the screen as 8-point font - ie more or less 8 * 1/72 inches = 2.82mm
high. More or less, I'm not insisting it be exact, but at least not
1mm or 5mm high.

In the (glorious) past I was able to look at xdpyinfo |egrep 'dimension|
resolution' and check that Xorg was giving something reasonable.. eg
  dimensions:    1600x1200 pixels (423x317 millimeters)
  resolution:    96x96 dots per inch

So far so good. With this new fangled gnome and fontconfig stuff, you
also need to set up some X-resources with:

xrdb -query |grep Xft
Xft.antialias:  1
Xft.dpi:        96
Xft.hinting:    1
Xft.hintstyle:  hintfull
Xft.rgba:       none

... and to inform gnome-settings-daemon with 

gnome-appearance-properties->Font->Details->dpi which is the same as:

gconftool-2 -s --type float /desktop/gnome/font_rendering/dpi 96

It's that last step that bothers me - it's not "per display", so if I
log in using a different X-server eg using VNC, I might well have a
completely different dpi. For example, my home monitor is a good-old
CRT with 152 dpi. I use 144 dpi as a multiple of 12 but if I log in
through vnc without changing /desktop/gnome/font_rendering/dpi, the
fonts are just wrong, wrong, wrong.

If I then fix things up in that VNC session, when I come back to the
physical monitor at 96 dpi, things are again wrong, until I fix it up
again. But then the VNC session(s) are wrong.

My question is this - surely there's a way to tell gconf/gnome that my
dpi setting is for DISPLAY X. Please tell me it's not just a global
setting for all displays!!


Thanks


Bob

-- 
Bob Hepple <bhepple at promptu.com>
ph: 07-5584-5908 Fx: 07-5575-9550