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 102936 - font = in ~/.gtkrc-2.0 does nothing.
font = in ~/.gtkrc-2.0 does nothing.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
2.0.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-01-09 13:29 UTC by Jan D.
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jan D. 2003-01-09 13:29:35 UTC
This contents:

 style "font14"
 {
   font = "-*-helvetica-bold-r-normal--14-*-*-*-*-*-iso10646-1"
 }
 widget_class "*" style "font14"

does absolutely nothing, even though the documentation says it should, and
xfd -fn '-*-helvetica-bold-r-normal--14-*-*-*-*-*-iso10646-1' shows the
font OK.  There is no message or warning.

Changing font = ... to
  font_name = "helvetica bold 14"
but since there seem to be no documentation about what a "Pango font name"
is, it is kind of hard to get exactly what you want.
Comment 1 Alex Duggan 2003-01-09 15:33:50 UTC
when the ~/.gtkrc-2.0 is being ignored, are you running in a
gnome-session or running any gnome apps?
Comment 2 Jan D. 2003-01-09 16:13:37 UTC
Sorry for not being clear.  ~/.gtkrc-2.0 is not being ignored.  If I
put other stuff inside style "font14", for example bg[NORMAL] = red,
it is applied as it should.  It is only font = that is being ignored.

I am not running any gnome processes, only fvwm.
Comment 3 Owen Taylor 2003-01-09 16:52:54 UTC
Maybe the docs could be improved, but this is working as expected.
GTK+ doesn't use XLFD's for fonts any more, so setting an 
XLFD is entirely useless.

If you want to change your default font from your gtkrc, just
do:

 gtk-font-name = "Helvetica 14"

Comment 4 Matthias Clasen 2003-01-09 18:47:07 UTC
Pango font names are explained in the Pango docs:
http://developer.gnome.org/doc/API/2.0/pango/pango-Fonts.html#pango-font-description-from-string
I think this information should 

a) be placed more prominently in the Pango docs
b) be linked from relevant places of the GTK docs
Comment 5 Matthias Clasen 2003-02-11 00:28:49 UTC
Fixed on both branches.