[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: once again: font sizes



On Mon, 07 Jul 2003 11:00:36 +0200
Erhard Schultchen <eschultchen@gmx.de> wrote:
>
> 
> Hi folks,
> 
> I know this is a very-FAQ, but I still can't get it working.
> 
> Environment: Debian/Sid with gnome2. 14" TFT-Display at 1024x768 and
> X set to 100dpi res.
> 
> Problem: font sizes in gtk1.2+ applications (sylpheed, openoffice, gimp)
> are ridicously large (measured about 6mm)

OK, so, to make sure I understand the question that you're asking . . .
you're using a GTK 2/Gnome 2 environment, but you still use some GTK 1/
Gnome 1 apps, and you wanna know how to adjust the fonts for those.

I love Linux, but there are still unpleasant things about it, and one
of those things is fonts, straight across the board.  Look in a
thesaurus under "labyrinthine" and "linux font configuration" will
be listed as a synonym.


> Already tried: Forcing other display-dpi values, reordering of fontlist,
> added to .Xdefaults:
> *fontList: \
> -adobe-helvetica-medium-*-*-*-8-*-*-*-*-46-iso8859-15

.. . .which are X-specific actions, but not GTK-specific actions, as I
understand it.  It's GTK that you're trying to reconfigure.


> Made fontsize values smaller in /etc/gtk/gtkrc.

Just out of curiosity, can you elaborate on this?  What did you do here,
specifically?


> Even changed system
> locale to en_us, having no effect.

The locale *can* have an effect here; or, at least it has for some people
(see below).


> As gtk1.2 programs are the only ones effected, I assume it is not a
> problem with the x-config. Non-gtk/kde programs work fine as well (xfig)

Right; the problem is probably with the configuration for GTK 1.2.

Here's how I dealt with this.

In your home directory, you'll see a lot of .gtkrc files.  For instance,
I see:

-rw-r--r--    1 cmetzler cmetzler      162 Jun 25 11:48 .gtkrc
-rw-r--r--    1 cmetzler cmetzler      137 Jun 25 21:21 .gtkrc-1.2-gnome2
-rw-r--r--    1 cmetzler cmetzler       27 Aug 26  2002 .gtkrc-2.0
-rw-r--r--    1 cmetzler cmetzler     1118 Apr  1 14:40 .gtkrc-kde
-rw-r--r--    1 cmetzler cmetzler      126 Jul  7 08:06 .gtkrc.mine

As I understand it, .gtkrc is the traditional configuration file for
old apps that use GTK 1; while .gtkrc-1.2-gnome2 is used by apps that
are still using GTK 1 for their look and feel, but do know how to talk
to the Gnome 2 session manager (sylpheed is an example of these).  For
more info on the latter, see:

http://mail.gnome.org/archives/desktop-devel-list/2002-July/msg00684.html

The important thing is that in each of them, there should be a line at
the end that looks like:

include "/home/cmetzler/.gtkrc.mine"

with whatever your home directory is substituted in, of course.
Various configuration programs use .gtkrc and .gtkrc-1.2-gnome2 to set
things, and have that line at the end so that you can put stuff you
want to adjust manually into that additional file.  So, .gtkrc.mine
is the file you want; but you need to make sure that .gtkrc and
..gtkrc-1.2-gnome2 call it.

In .gtkrc.mine, I have the following stuff:

style "user-font"
{
  fontset="-monotype-arial-medium-r-normal-*-14-*-*-*-p-*-iso8859-1"
}
widget_class "*" style "user-font"

That sets the font for the user interface for GTK 1.2 apps; adjusting
the 14 to 12 or whatever will allow you to change the fontsize as you
desire.  You can also change to another font if you wish.

Note that this will *not* adjust the fonts used *within* GTK 1.2 apps;
those are configured through each app individually, if I remember
correctly.  This will merely configure the font of menu bars, pull
down menus, information boxes, etc.

One other thing:  at least one person has posted online saying that
their ability to set GTK 1.2 font was affected by the locale they
chose.  If they chose the wrong locale, font settings had no effect.
See:

http://lists.debian.org/debian-testing/2003/debian-testing-200305/msg00058.html

Hope this helps.  If it doesn't, let me know.  I've been trying to
pull together into one place everything I *think* I've learned about
fonts, both so that I'm not constantly having to research the same
things over and over and also in case it's a help to anyone else.
If I've got something wrong, I definitely wanna know.

-c

-- 
Chris Metzler			cmetzler@speakeasy.snip-me.net
		(remove "snip-me." to email)

"As a child I understood how to give; I have forgotten this grace since I
have become civilized." - Chief Luther Standing Bear



Reply to: