You can use the GTK2_RC_FILES environment variable to control the appearance of (individual) GTK2 applications.
Create a custom gtkrc config (e.g. ~/.fbpanel-gtkrc) for fbpanel and set your font (or any style) settings in there:
style "custom-font" {
font_name = "Sans 16"
}
class "*" style "custom-font"
Then modify the start command for fbpanel to set GTK2_RC_FILES=~/.fbpanel-gtkrc. For example, if you launch it through the .desktop file, change the Exec line like this:
Exec=env GTK2_RC_FILES=~/.fbpanel-gtkrc fbpanel
Explanation
When a GTK2 application starts, it loads settings in a particular sequence, layering configurations on top of each other. This layering allows later settings to override earlier ones. The sequence is as follows:
- GTK2 first loads the settings from the system-wide configuration file, usually found in /etc/gtk-2.0/gtkrc.
- Next, GTK2 loads the user's personal configuration file, typically ~/.gtkrc-2.0, if it exists.
- If the
GTK2_RC_FILES environment variable is set, GTK2 will load the configuration files specified in that variable in the order they're listed (separated by colons). These settings can override any previously loaded settings.
- Finally, an application can have the application-specific settings that it applies after reading the GTK2 configurations. These might override or augment the loaded GTK2 settings. In the case of
fbpanel, I didn't find a way to set fonts from its configs.
I hope this helps!