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 573210 - Handle DPI settings change when resolution changes
Handle DPI settings change when resolution changes
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: xsettings
2.24.x
Other All
: Normal enhancement
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
: 578974 (view as bug list)
Depends on:
Blocks: randr-tracker
 
 
Reported: 2009-02-26 01:11 UTC by Sam Morris
Modified: 2011-03-03 17:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initial font size (203.50 KB, image/jpeg)
2009-02-26 01:12 UTC, Sam Morris
Details
fonts shrink when appearance capplet is run (201.31 KB, image/jpeg)
2009-02-26 01:13 UTC, Sam Morris
Details
laptop initial font sizes (401.91 KB, image/png)
2009-03-16 17:02 UTC, Sam Morris
Details
laptop font sizes after running gnome-appearance-properties (481.39 KB, image/png)
2009-03-16 17:03 UTC, Sam Morris
Details

Description Sam Morris 2009-02-26 01:11:19 UTC
Please describe the problem:
When I log in, fonts are very large (see first attachment). When I run gnome-appearance-properties, they instantaneously change to be the right size (see second attachment).

I don't really know what to file this bug against, so I've guessed. Hope that's OK.

Steps to reproduce:
1. Log in


Actual results:
Fonts are too large

Expected results:
Fonts should not all become smaller when I run gnome-appearance-properties

Does this happen every time?
Yes

Other information:
$ gconftool --dump /desktop/gnome/font_rendering
<gconfentryfile>
  <entrylist base="/desktop/gnome/font_rendering">
    <entry>
      <key>antialiasing</key>
      <schema_key>/schemas/desktop/gnome/font_rendering/antialiasing</schema_key>
      <value>
        <string>grayscale</string>
      </value>
    </entry>
    <entry>
      <key>dpi</key>
      <schema_key>/schemas/desktop/gnome/font_rendering/dpi</schema_key>
    </entry>
    <entry>
      <key>hinting</key>
      <schema_key>/schemas/desktop/gnome/font_rendering/hinting</schema_key>
      <value>
        <string>full</string>
      </value>
    </entry>
    <entry>
      <key>rgba_order</key>
      <schema_key>/schemas/desktop/gnome/font_rendering/rgba_order</schema_key>
      <value>
        <string>rgb</string>
      </value>
    </entry>
  </entrylist>
</gconfentryfile>

$ gconftool --dump /desktop/gnome/interface
<gconfentryfile>
  <entrylist base="/desktop/gnome/interface">
    <entry>
      <key>accessibility</key>
      <schema_key>/schemas/desktop/gnome/interface/accessibility</schema_key>
      <value>
        <bool>false</bool>
      </value>
    </entry>
    <entry>
      <key>can_change_accels</key>
      <schema_key>/schemas/desktop/gnome/interface/can_change_accels</schema_key>
      <value>
        <bool>false</bool>
      </value>
    </entry>
    <entry>
      <key>cursor_blink</key>
      <schema_key>/schemas/desktop/gnome/interface/cursor_blink</schema_key>
      <value>
        <bool>false</bool>
      </value>
    </entry>
    <entry>
      <key>cursor_blink_time</key>
      <schema_key>/schemas/desktop/gnome/interface/cursor_blink_time</schema_key>
      <value>
        <int>1082</int>
      </value>
    </entry>
    <entry>
      <key>document_font_name</key>
      <schema_key>/schemas/desktop/gnome/interface/document_font_name</schema_key>
      <value>
        <string>Sans 8</string>
      </value>
    </entry>
    <entry>
      <key>enable_animations</key>
      <schema_key>/schemas/desktop/gnome/interface/enable_animations</schema_key>
      <value>
        <bool>true</bool>
      </value>
    </entry>
    <entry>
      <key>file_chooser_backend</key>
      <schema_key>/schemas/desktop/gnome/interface/file_chooser_backend</schema_key>
      <value>
        <string>gnome-vfs</string>
      </value>
    </entry>
    <entry>
      <key>font_name</key>
      <schema_key>/schemas/desktop/gnome/interface/font_name</schema_key>
      <value>
        <string>Sans 8</string>
      </value>
    </entry>
    <entry>
      <key>gtk-im-module</key>
      <schema_key>/schemas/desktop/gnome/interface/gtk-im-module</schema_key>
      <value>
        <string></string>
      </value>
    </entry>
    <entry>
      <key>gtk-im-preedit-style</key>
      <schema_key>/schemas/desktop/gnome/interface/gtk-im-preedit-style</schema_key>
      <value>
        <string>callback</string>
      </value>
    </entry>
    <entry>
      <key>gtk-im-status-style</key>
      <schema_key>/schemas/desktop/gnome/interface/gtk-im-status-style</schema_key>
      <value>
        <string>callback</string>
      </value>
    </entry>
    <entry>
      <key>gtk_key_theme</key>
      <schema_key>/schemas/desktop/gnome/interface/gtk_key_theme</schema_key>
      <value>
        <string>Default</string>
      </value>
    </entry>
    <entry>
      <key>gtk_theme</key>
      <schema_key>/schemas/desktop/gnome/interface/gtk_theme</schema_key>
      <value>
        <string>Clearlooks</string>
      </value>
    </entry>
    <entry>
      <key>icon_theme</key>
      <schema_key>/schemas/desktop/gnome/interface/icon_theme</schema_key>
      <value>
        <string>gnome</string>
      </value>
    </entry>
    <entry>
      <key>menubar_accel</key>
      <schema_key>/schemas/desktop/gnome/interface/menubar_accel</schema_key>
      <value>
        <string>F10</string>
      </value>
    </entry>
    <entry>
      <key>menubar_detachable</key>
      <schema_key>/schemas/desktop/gnome/interface/menubar_detachable</schema_key>
      <value>
        <bool>false</bool>
      </value>
    </entry>
    <entry>
      <key>menus_have_icons</key>
      <schema_key>/schemas/desktop/gnome/interface/menus_have_icons</schema_key>
      <value>
        <bool>true</bool>
      </value>
    </entry>
    <entry>
      <key>menus_have_tearoff</key>
      <schema_key>/schemas/desktop/gnome/interface/menus_have_tearoff</schema_key>
      <value>
        <bool>false</bool>
      </value>
    </entry>
    <entry>
      <key>monospace_font_name</key>
      <schema_key>/schemas/desktop/gnome/interface/monospace_font_name</schema_key>
      <value>
        <string>Monospace 8</string>
      </value>
    </entry>
    <entry>
      <key>show_input_method_menu</key>
      <schema_key>/schemas/desktop/gnome/interface/show_input_method_menu</schema_key>
      <value>
        <bool>true</bool>
      </value>
    </entry>
    <entry>
      <key>show_unicode_menu</key>
      <schema_key>/schemas/desktop/gnome/interface/show_unicode_menu</schema_key>
      <value>
        <bool>true</bool>
      </value>
    </entry>
    <entry>
      <key>status_bar_meter_on_right</key>
      <schema_key>/schemas/desktop/gnome/interface/status_bar_meter_on_right</schema_key>
      <value>
        <bool>false</bool>
      </value>
    </entry>
    <entry>
      <key>toolbar_detachable</key>
      <schema_key>/schemas/desktop/gnome/interface/toolbar_detachable</schema_key>
      <value>
        <bool>false</bool>
      </value>
    </entry>
    <entry>
      <key>toolbar_icons_size</key>
      <schema_key>/schemas/desktop/gnome/interface/toolbar_icons_size</schema_key>
      <value>
        <string>large-toolbar</string>
      </value>
    </entry>
    <entry>
      <key>toolbar_style</key>
      <schema_key>/schemas/desktop/gnome/interface/toolbar_style</schema_key>
      <value>
        <string>both-horiz</string>
      </value>
    </entry>
    <entry>
      <key>use_custom_font</key>
      <schema_key>/schemas/desktop/gnome/interface/use_custom_font</schema_key>
      <value>
        <bool>false</bool>
      </value>
    </entry>
  </entrylist>
</gconfentryfile>
Comment 1 Sam Morris 2009-02-26 01:12:29 UTC
Created attachment 129529 [details]
initial font size
Comment 2 Sam Morris 2009-02-26 01:13:03 UTC
Created attachment 129530 [details]
fonts shrink when appearance capplet is run
Comment 3 Sam Morris 2009-02-28 00:57:26 UTC
I used the freedesktop.org xsettings-client to examine font settings after I logged in. Gtk/FontName was originally set to "Sans 9". After I run gnome-appearance-properties, it is changed to "Sans 8".
Comment 4 Jens Granseuer 2009-02-28 09:51:39 UTC
Exact version of gnome-settings-daemon?
Comment 5 Sam Morris 2009-02-28 12:11:06 UTC
2.24.1
Comment 6 Sam Morris 2009-03-16 17:00:13 UTC
This is rather more extreme on my laptop with an external monitor connected. Screenshots to come!
Comment 7 Sam Morris 2009-03-16 17:02:06 UTC
Created attachment 130762 [details]
laptop initial font sizes
Comment 8 Sam Morris 2009-03-16 17:03:00 UTC
Created attachment 130765 [details]
laptop font sizes after running gnome-appearance-properties
Comment 9 Jens Granseuer 2009-03-16 20:41:55 UTC
I've never been able to reproduce this, unfortunately. There have been other reports of similar behaviour, though (that I can't find at the moment).
Comment 10 Sam Morris 2009-03-16 23:30:09 UTC
I can now reproduce this with a freshly-created user.

 1. Log in
 2. In gnome-display-properties, set the resolution to a lower one than the default
 3. Log out
 4. Log in
 5. Check that your screen resolution preference was restored here!
 5. Check the size of fonts on screen
 6. Launch gnome-appearance-properties
 7. Fonts change size!
Comment 11 Sam Morris 2009-03-17 00:03:33 UTC
I've looked more closely at the xsettings that change after gnome-appearance-properties is run, and I was wrong about Gtk/FontSize--it does not change. The setting that changes is Xft/DPI. After I log in, it is 127540. After g-a-p is run, it is changed to 102032.

The former setting more closely resembles (I assume) my display's resolution as reported by xdpyinfo of 123x126 dpi.

Perhaps gnome-settings-daemon calculates the value for Xdt/DPI based on the resolution when it is launched, and it does not update the value when the screen resolution changes?
Comment 12 Sam Morris 2009-03-17 11:50:30 UTC
A workaround is to force the screen resolution to a sensible value (e.g., 96dpi) in Appearance -> Fonts -> Details -> Resolution.
Comment 13 Jens Granseuer 2009-04-14 21:07:46 UTC
*** Bug 578974 has been marked as a duplicate of this bug. ***
Comment 14 roberth.sjonoy 2009-04-14 21:10:27 UTC
This started to happen to me starting from gnome 2.26, the only difference for me is that the fonts are way to small.
Comment 15 Bastien Nocera 2011-03-03 16:52:27 UTC
There's currently no support for changing the DPI settings when the resolution changes.
Comment 16 Bastien Nocera 2011-03-03 17:24:21 UTC
DPI is now hard-coded to 96 dpi.

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