GNOME Bugzilla – Bug 573210
Handle DPI settings change when resolution changes
Last modified: 2011-03-03 17:24:21 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>
Created attachment 129529 [details] initial font size
Created attachment 129530 [details] fonts shrink when appearance capplet is run
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".
Exact version of gnome-settings-daemon?
2.24.1
This is rather more extreme on my laptop with an external monitor connected. Screenshots to come!
Created attachment 130762 [details] laptop initial font sizes
Created attachment 130765 [details] laptop font sizes after running gnome-appearance-properties
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).
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!
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?
A workaround is to force the screen resolution to a sensible value (e.g., 96dpi) in Appearance -> Fonts -> Details -> Resolution.
*** Bug 578974 has been marked as a duplicate of this bug. ***
This started to happen to me starting from gnome 2.26, the only difference for me is that the fonts are way to small.
There's currently no support for changing the DPI settings when the resolution changes.
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