Help - Search - Members - Calendar
Full Version: Openbox & GTK Fonts
Neowin Forums > *nix Customization & Support > Customizing your *nix Desktop
mjcburr
I've been kind of switching between KDE, GNOME and Openbox for the last few months and something that I had previously not noticed has started to annoy me. If I use Firefox in Openbox, the font that I had selected with gtk-chtheme is used for the application font, but within Firefox itself, I notice that some fonts appear larger than others, but only in Openbox. I poked around a bit and if I run gnome-font-properties, it seems to correct this, but that seems like a sloppy solution, as I don't run gnome-settings-daemon (which corrects everything). Does anyone know of what I can add to my .gtkrc-2.0 file for font settings?
rezza
QUOTE(matt74441 @ Feb 22 2006, 23:58) [snapback]587231321[/snapback]

I've been kind of switching between KDE, GNOME and Openbox for the last few months and something that I had previously not noticed has started to annoy me. If I use Firefox in Openbox, the font that I had selected with gtk-chtheme is used for the application font, but within Firefox itself, I notice that some fonts appear larger than others, but only in Openbox. I poked around a bit and if I run gnome-font-properties, it seems to correct this, but that seems like a sloppy solution, as I don't run gnome-settings-daemon (which corrects everything). Does anyone know of what I can add to my .gtkrc-2.0 file for font settings?


I think this is a firefox issue. Normally, apps either pick up on the font defined in .gtkrc-2.0, or they get told what font to use by gnome-settings-daemon. Firefox works great with gnome-settings-daemon, but doesn't do what it should do with the .gtkrc-2.0. I think you might just have to live with it, unless you want to run a settings daemon.
chavo
There are 2 methods of defining fonts in your .gtkrc-2.0, it's recommended to use both for backwards compatibility.

the first is like this ->


style "user-font"
{
font_name="Bitstream Vera Sans 10"
}
widget_class "*" style "user-font"

And again like this ->

gtk-font-name="Bitstream Vera Sans 10"

Firefox will only use the font described in the gtk-font-name section.

mjcburr
^ That solved the problem with the actual application font appearing bigger than normal, but the problem with the webpage font still exists. Getting closer!
theotherdave
QUOTE(matt74441 @ Feb 22 2006, 23:58) [snapback]587231321[/snapback]
...poked around a bit and if I run gnome-font-properties, it seems to correct this, but that seems like a sloppy solution, as I don't run gnome-settings-daemon (which corrects everything). Does anyone know of what I can add to my .gtkrc-2.0 file for font settings?
Do you run any xsettings manager at all? If not, how do you get your apps use the GTK theme you've selected?

mjcburr
QUOTE(theotherdave @ Feb 23 2006, 04:04) [snapback]587232996[/snapback]

Do you run any xsettings manager at all? If not, how do you get your apps use the GTK theme you've selected?

Well I decided not to run the gnome-settings-daemon to set my GTK preferences because it also brings some other GNOME-related settings that I'm not interested in. The only settings file that I'm using is my .gtkrc-2.0 file:

CODE

gtk-icon-theme-name = "dlg-etiquette"
gtk-theme-name = "Clearlooks"

style "user-font"
{
        font_name = "Bitstream Vera Sans 8"
}

widget_class "*" style "user-font"

gtk-font-name = "Bitstream Vera Sans 8"
mitch00
Nice, this thread helped me solve a minor inconvenience I was having but never bothered looking up how to fix smile.gif
mjcburr
Ya, its a handy little file to keep around, especially if you don't have a GNOME installation on your system. I may actually submit this over at Gentoo-Wiki, and let the experts correct it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.