2008-06-08

Fixing Gtk+ Abnormal Font Size

It certainly says something about a piece of software when the majority of front-page query results on Google for it pertain to bugs than actual praise. A case in point is gnome-settings-daemon, the userspace daemon that loads preferences for Gtk+ and GNOME applications.

I gave up using fully-featured desktop environments like KDE, GNOME, CDE, XFCE, etc. about two years ago and never turned back. One of the major drawbacks from this with Gtk+ and GNOME applications is that font sizes never seem to render accurately in the absence of gnome-settings-daemon. Primarily their sizes appear at least three points larger.



Given this, I had explored several setups with Gtk+ resource files but never found anything quite satisfactory until now.

I ended up tweaking ~/.gtkrc-2.0 such that

style "user-font"
{
font_name="Verdana 7"
}

widget_class "*" style "user-font"

gtk-font-name = "Verdana 8"

was included, and behold the results in the lower-right quadrant.

Enjoy.

0 comments:

 
None of the content contained herein represents the views of my employer nor should it be construed in such a manner.