Gnome panel fonts

In pursuit of the “perfect desktop”, I’d like to use a different font (or perhaps a different font size) in the Gnome panel, but the Appearance>Fonts>Application font setting governs so much more than the panel. Gconf appears to do the same.
Is there a way of changing the panel font without affecting anything else?

gminnerup wrote:

> In pursuit of the “perfect desktop”, I’d like to use a different font
> (or perhaps a different font size) in the Gnome panel, but the
> Appearance>Fonts>Application font setting governs so much more than the
> panel. Gconf appears to do the same.
> Is there a way of changing the panel font without affecting anything
> else?

I am almost sure there is… but gnome tweaks are very, very, very
hidden :slight_smile:

Take a search in Google:

http://www.google.com/search?hl=en&q=gnome+panel+fonts+.gtkrc-2.0&btnG=Search

Sorry for not being more precise, but I couldn’t get any documentation on
this. Anyway, I guess editing your ~/.gtkrc-2.0 file is the way to go.

Greetings,


Camaleón

Thanks for the suggestion but I’ve done that and the search comes up with zillions of discussions of how to change the font colour - which I have managed to do before - but not the font itself. Everything I try just changes the global “application font” when I just want to change the font used in the panel.

gminnerup wrote:

> Thanks for the suggestion but I’ve done that and the search comes up
> with zillions of discussions of how to change the font colour - which I
> have managed to do before - but not the font itself. Everything I try
> just changes the global “application font” when I just want to change
> the font used in the panel.

Is not that hard :wink:

Edit (or create) your ~/.gtkrc-2.0 file and add the following:


sytle "my_panel"
{
font_name = "Arial 10"
}

widget "MenuItem" style "my_panel"

And then, restart “gnome-panel”


killall gnome-panel

And check the result.

Greetings,


Camaleón

Nope, doesn’t work, even when I change “sytle” to “style” :wink:
But thanks for trying!

gminnerup wrote:

> Nope, doesn’t work, even when I change “sytle” to “style” :wink:
> But thanks for trying!

Weird. It works for me (using openSUSE 11.1 and default Gnome release).

It changes the Gnome panel (old style, not suse style) font to Arial font at
10pt while system default is Tahoma 8 pt :-?

Greetings,


Camaleón

You mean the menu? I’m using SUSE’s menu not the old Gnome one with “Applications/Places/System”.

gminnerup wrote:

> You mean the menu? I’m using SUSE’s menu not the old Gnome one with
> “Applications/Places/System”.

Yes, that tip was for “old style” menu, not the new one (named “Slab”).

Well, let me see…


style "my_panel"
{
 font_name = "Arial 10"
}

widget "*slab-main-menu-window*" style "my_panel"

And then, restart “gnome-panel”


killall gnome-panel

Hope this time goes better :wink:

Greetings,


Camaleón

No difference…:frowning:

Hi
Did you do a copy and paste of the gtkrc config, if so copying from the
web can create invisible characters… Manually enter the info and
then try that.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.21-0.1-pae
up 23:41, 1 user, load average: 0.24, 0.07, 0.02
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

I entered it directly, using a text editor called from the terminal.

gminnerup wrote:

> No difference…:frowning:

This is getting pretty weird :slight_smile:

Can you please copy/paste your “~/.gtkrc-2.0”?

Greetings,


Camaleón

Here it is:

style "my_panel"
{
*font_name = "Arial 11"
}

widget "*slab-main-menu-window*" style "my_panel"

I’ve just used a larger size to make the effect more obvious.

Just to add: the file is located in /home/hgm/.gtkrc-2.0 (hgm is my local username). I created it because I couldn’t find another, pre-existing .gtkrc-2.0 anywhere else.

gminnerup wrote:

> Here it is:
>
> Code:
> --------------------
> style “my_panel”
> {
> *font_name = “Arial 11”
> }
>
> widget “slab-main-menu-window” style “my_panel”
>
> --------------------
>
> I’ve just used a larger size to make the effect more obvious.

Two things:

  1. Line “font_name = Arial 11” should start with a “blank” space, not with
    an asterisk “*” (mmm, maybe a KNode glitch :-/).

  2. Do you have installed “Arial” font? If no, you should use a font you have
    installed in your system so you can see the changes.

Greetings,


Camaleón

With the asterisk in front of the font_name gone, it finally worked! Well, not quite how I intended it though: I probably didn’t make myself clear enough. When I said I wanted to change the Gnome panel font, I meant the font used for menu names (“Computer” in SUSE, “Applications/Places/System” in plain vanilla) and all the other things that appear in the panel (application windows, date and time, etc). I can change that with Appearance/Fonts/Applications but that affects more than just the panel font.
Is that clearer now? Many thanks for your help, I’m sorry if I didn’t say clearly enough what I was after. Of course, if you know the answer to THIS issue as well, that would be much appreciated. I would guess that’s some other widget(s) to be styled?

gminnerup wrote:

> With the asterisk in front of the font_name gone, it finally worked!

Thank goodness! :slight_smile:

> Well, not quite how I intended it though: I probably didn’t make myself
> clear enough. When I said I wanted to change the Gnome panel font, I
> meant the font used for menu names (“Computer” in SUSE,
> “Applications/Places/System” in plain vanilla) and all the other things
> that appear in the panel (application windows, date and time, etc). I
> can change that with Appearance/Fonts/Applications but that affects more
> than just the panel font.
> Is that clearer now? Many thanks for your help, I’m sorry if I didn’t
> say clearly enough what I was after. Of course, if you know the answer
> to THIS issue as well, that would be much appreciated. I would guess
> that’s some other widget(s) to be styled?

Yes, it is a bit more clear now.

And yes, now that you already know how it goes, you can test some other
things in your ~/.gtkrc-2.0, i.e.:


style “my_panel”
{
font_name = “Arial 10”
}

widget “slab-main-menu-window” style “my_panel”
widget “PanelWidget” style “my_panel”
widget “PanelApplet” style “my_panel”


And restart gnome-panel “killall gnome-panel” and check for the results.

You can find more “tweaks” in Google. THT.

Greetings,


Camaleón

Thanks, will try that tomorrow (too late in Sydney now). I’ve been doing a fair bit of googling about GTK etc. It’s a steep learning curve…

Give this a try: GNOME Color Chooser - Official Website | Home It has hundreds of options.

Thanks, will have a look. Just out of interest: I now find this thread duplicated, how’s that possible? Wasn’t me, for sure…