Settng DPI on gdm and Sessions

Adam Williamson awilliam at redhat.com
Wed May 20 00:06:49 UTC 2009


On Tue, 2009-05-19 at 16:40 -0600, Christopher A. Williams wrote:
> On Tue, 2009-05-19 at 21:38 +0200, Kevin Kofler wrote:
> > Christopher A. Williams wrote:
> > > On one system I have, F11 gdm was automatically set to 120DPI, which
> > > looked absolutely hideous at 1440X900 resolution. On another system, it
> > > set itself automatically to 94DPI, which looked better, but not ideal.
> > > I'd really like the default on both to be 96DPI (or perhaps 100DPI).
> > 
> > It defaults to the actual correct DPI value for your screen (monitor),
> > unless your screen is broken and reports a nonsense DPI.
> 
> ...Umm, no.
> 
> My TP T400 laptop defaulted to 120DPI, and my desktop at home with a
> GeForce Series nVidia chipset and a 24" Acer LCD panel defaulted to
> 94DPI.
> 
> Neither one of these was "optimal". At 120DPI (1440x900 native
> resolution), the T400 display looks absolutely crummy. Changing it to
> 96DPI made it crystal clear and sharp. Doing the same on my LCD panel on
> my desktop had exactly the same effect, albeit less so since it was
> pretty close already.
> 
> In every case where I have had the opportunity to load F10 and F11 (many
> different systems / hardware combinations), I have yet to see a
> "correct", as you put it, DPI set up as a default. It's not possible
> that all of those systems' displays were, again as you put it, broken.
> In fact, none of them were.

It sounds like you're not really following the concept of DPI. I'm not
sure how you could possibly see different DPI settings as "sharp" or
"not sharp", that just isn't the effect of changing DPI at all. All it
does is cause characters to be rendered larger (high DPI) or smaller
(low DPI).

> Regardless of all of that, there should always be a way to tell X what
> DPI you want anyway. Who said the manufacturer's "correct" setting is
> the best for you, and that's assuming they use a standard way of
> specifying that? 

OK, clearly you don't understand the concept.

There's no such thing as a DPI that's 'best for you'. DPI means dots per
inch. The correct DPI is a pure mathematical calculation based on the
size of the display and the resolution in use. There is no room for
subjectivity.

The objective of setting the correct DPI is so that fonts will be
rendered at the correct size. There is an absolute, standard definition
of exactly how big - in real, physical units, not pixels - a twelve
point letter A should be, for instance. When you set your display to the
correct DPI, a 12 point letter A will be displayed at exactly the right
size in actual physical terms (inches, centimetres, whatever it says on
your ruler).

If everyone set their DPI correctly (and all applications and desktops
rendered fonts, and physical size-specified graphical items, correctly),
then - no matter what particular display you happened to be looking at
things on - they'd always look the same size, and that would be the size
the creator intended.

There's several technical obstacles to this goal, which is why GNOME
recently decided to forget about trying to respect this concept
('resolution independence') and just override everyone's DPI setting to
96. This is a regrettable but fairly sensible decision. However, if you
don't understand the theory here, you're never going to get what's going
on exactly right.

> Clearly different manufacturers do this differently. 

Manufacturers do not specify the correct DPI, nor do they 'do it
differently'. Display panels provide their physical size via their EDID
information. X uses this information combined with its knowledge of what
resolution is in use to calculate the correct DPI. Some displays provide
their size in stupidly boneheaded ways, but most of these special cases
have been caught by now, and the values that were calculated for your
displays both sound like they were correct, to me. If you're not
confident in your monitor manufacturer, it's fairly trivial to figure
out the correct DPI setting for your monitor with nothing but a ruler.
Measure the display in inches horizontally, and divide the result into
the horizontal resolution in pixels. That's the correct DPI setting for
the display.

> As
> such there is no standard per se.

Yes, there is.
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Fedora Talk: adamwill AT fedoraproject DOT org
http://www.happyassassin.net




More information about the fedora-test-list mailing list