Re: Controlling Fonts and Font Sizes in GTK Applications
Op Fri, 22 May 04:43 -0400 Hal Vaughan wrote:
> Still can't find an app that sets GTK font sizes directly -- if
> someone knows of one, it'd be nice to know what it is, if only just
> for the record.
Using Gnome, the GTK system font and font size are set in Gnome's
Control Center.
To do the same while not using Gnome, first start gnome-settings-daemon
(as user, it's in /usr/bin), then start gnome-control-center (again as
user) and go to Look and Feel > Appearance > tab 'Fonts'.
gnome-settings-daemon needs to be running all the time, so you'd better
have it start automatically, e.g. by putting it in KDE's autostart
folder.
But there is a second method that does not require
gnome-settings-daemon to run.
Create ~/.gtkrc-2.0 (if it does not already exist) and add a line like
this:
gtk-font-name = "Liberation Sans 11"
BTW, Liberation Sans is the font I personally prefer for screen display.
'ttf-liberation' is in the repositories.
While we're at it, I'd suggest to add a second line in ~/.gtkrc-2.0 :
gtk-can-change-accels = 1
To demonstrate what it does, here's an example.
Fire up Gimp, go to File > Create > Screenshot, and, keeping the mouse
pointer over 'Screenshot', press Ctrl-Alt-S.
You'll see then that the key binding Ctrl-Alt-S has been assigned to
'Screenshot'.
Reply to: