After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 553652 - Do not use DPI from the X server. Yet.
Do not use DPI from the X server. Yet.
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: xsettings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on: gtk-ri
Blocks:
 
 
Reported: 2008-09-24 20:06 UTC by Vincent Untz
Modified: 2011-03-04 00:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot with DPI = 120 (natural DPI of my laptop) (70.33 KB, image/png)
2008-09-25 15:01 UTC, Vincent Untz
Details
Screenshot with DPI = 96 (63.95 KB, image/png)
2008-09-25 15:03 UTC, Vincent Untz
Details

Description Vincent Untz 2008-09-24 20:06:43 UTC
Following bug 378338, we now use the real DPI for screens. That's cool, except for recent screens which have a DPI of ~120. Here's what's happening:

 + g-s-d computes the DPI by looking if there's something in gconf (ignoring the default value). For a new user, there's nothing. So we default on the value returned by the X server. Sounds sane so far.

  + then we have default values for font sizes. It's 10. Always. No matter what the DPI is.

A font size of 10 is good for a DPI around 96 (the old hard-coded value). However, it results in "big" fonts for DPI around 120.

So the result is that for a new user, we have ugly fonts. Quite bad. In bug #378338 comment #39, Owen proposes a logical DPI. That could be a solution.

Anyway, short term, I think the sanest thing is to go back to hard-coding 96.
Comment 1 Behdad Esfahbod 2008-09-24 22:02:29 UTC
Vincent, I don't follow.  Having real DPI is *exactly* good to have fonts that have a bigger *pixel-size*, and hence the same physical size, on higher-res screens.
Comment 2 Vincent Untz 2008-09-25 15:01:43 UTC
Created attachment 119374 [details]
Screenshot with DPI = 120 (natural DPI of my laptop)
Comment 3 Vincent Untz 2008-09-25 15:03:22 UTC
Created attachment 119375 [details]
Screenshot with DPI = 96
Comment 4 Vincent Untz 2008-09-25 15:04:27 UTC
I'm not talking about physical size, but about looking-good size. If you look at the screenshots, the one for DPI = 96 looks better.
Comment 5 Behdad Esfahbod 2008-09-25 15:13:59 UTC
Font look-good is *VERY VERY VERY VERY VERY subjective.  To me the 120dpi one looks much better.  And indeed that's what I have on my screen.
Comment 6 Pacho Ramos 2008-11-09 19:10:08 UTC
I also suffered a similar problem and finally workarounded it forcing DPI to 96 in my xorg.conf . Maybe this is subjetive, but I also prefer how fonts look at 96 over 120 :-)
Comment 7 Vincent Untz 2008-11-24 17:32:59 UTC
I really wonder what we can do here. The sanest thing I can imagine is to:

 + first have some logical DPI used by default, as proposed by Owen
 + and then have some zoom in/zoom out buttons easily reachable in GDM,
   and use the settings from GDM on the first login of the user as default values.

I think it would accomodate at least most cases.
Comment 8 Bastien Nocera 2009-09-09 15:24:28 UTC
A candidate for blocking on bug 546711 I would think
Comment 9 Nicolas Mailhot 2009-09-09 18:20:42 UTC
Folks, the font *size* is 10 (pt) not 96/120 dpi. If you want to change the font size because you like small fonts change the 10 do not meddle with X-computed DPI!

If you want a specific size in *pixels*, change the font dialog so it accepts values with a pixel unit (ie 16 px instead of 10 pt). That's all what forcing 96dpi does: make vector units a fixed pixel size by setting the conversion factor to a fake fixed value.
Comment 10 Behdad Esfahbod 2009-09-09 19:27:28 UTC
Nicolas, thanks for the comment.  This seems to be a lost battle as far as I'm concerned... :(
Comment 11 Bastien Nocera 2011-03-03 17:27:11 UTC
commit a49af89751057649034a42c511d2330d63bbfa6e
Author: Bastien Nocera <hadess@hadess.net>
Date:   Thu Mar 3 17:16:42 2011 +0000

    xsettings: Hard-code the default DPI
    
    We cannot rely on the X server giving us a decent DPI value,
    and we do not want to change the DPI when the resolution changes,
    or when multiple monitors are attached.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=643704
Comment 12 Behdad Esfahbod 2011-03-04 00:15:36 UTC
(In reply to comment #11)
> commit a49af89751057649034a42c511d2330d63bbfa6e
> Author: Bastien Nocera <hadess@hadess.net>
> Date:   Thu Mar 3 17:16:42 2011 +0000
> 
>     xsettings: Hard-code the default DPI
> 
>     We cannot rely on the X server giving us a decent DPI value,
>     and we do not want to change the DPI when the resolution changes,
>     or when multiple monitors are attached.
> 
>     https://bugzilla.gnome.org/show_bug.cgi?id=643704

I dislike...
Comment 13 Bastien Nocera 2011-03-04 00:31:19 UTC
(In reply to comment #12)
<snip>
> I dislike...

Feel free to dislike around a warm cup of tea with Federico and Owen. Let me know who comes out alive of that discussion.
Comment 14 Behdad Esfahbod 2011-03-04 00:35:08 UTC
(In reply to comment #13)
> (In reply to comment #12)
> <snip>
> > I dislike...
> 
> Feel free to dislike around a warm cup of tea with Federico and Owen. Let me
> know who comes out alive of that discussion.

Heh.  Ok :)