[Gllug] Help with fonts in Gnome 2.4

Mike Brodbelt mike at coruscant.demon.co.uk
Fri Feb 6 20:32:42 UTC 2004

On Thu, 2004-02-05 at 17:18, John Winters wrote:

> I don't know why they did this - it may have been something to do with
> me installing gsfonts-x11 - but there doesn't seem to be any way to
> switch them back.  The font configuration tool in the Gnome desktop is
> very basic and doesn't seem to offer an option to change the default
> body font.  I can't discover where the applications are getting their
> instruction to use this silly font from.

You could try having a look in regedit^H^H^H^H gconf-editor for the
values. Gnome policy seems to be to stuff everything in a nice
inaccessible configuration database these days... Once that's done
they're concentrating on re-implemtign .NET. Conspiracy theories abound

> I confess I have absolutely no knowledge of how the font system is
> structured these days and the Gnome documentation is worse than useless.

It's somewhat app-dependant, and it's a bit of a black art. If you're
running a standard-ish Debian box, some apps will request fonts through
the normal "old" X methods, but GTK2/GNOME2 stuff, usually linked
against libXft also pays attention to /etc/X11/XftConfig. Xft then uses
fontconfig, which is a library that "chooses" fonts. Fontconfig will
return a matching font, but it isn't a rasteriser, so Xft uses freetype
for that... Debian tries to manage the resultant nightmare with defoma,
which is supposed to handle the job of registering newly installed fonts
with fontconfig.

So, we have:-

1/ Stuff that just uses standard X fonts provided by the X server, or
served with xfs. The traditional way...

2/ GTK2/GNOME2 stuff, that uses fontconfig. These apps use *client* side
fonts, selected by fontconfig, and rasterised with freetype. On a Debian
box, these fonts are typically found in /usr/share/fonts and ~/.fonts,
and fontconfig configuration information is in /etc/fonts. Stored in
XML, no less.

3/ There used to be a horrible hack for GTK1 apps where people wanted
anti-aliasing. This involved a library called libgdkxft, which IIRR
overloaded certain functions using an LD_PRELOAD type hack. You had to
set the GDK_USE_XFT environment variable for this to work properly.

When you use fonts:/// in the file browser, it's almost certainly
showing you a list of fontconfig provided fonts. Using xfontsel will
show you a list of the X provided ones.

So, for example, "normally" your True Type fonts won't be seen by
non-fontconfig aware apps. They're typically installed in Debian with
defoma (debian font manager), which can make them available to
non-fontconfig aware apps if you install x-ttcidfont-conf, which makes
defoma capable of operating with X provided fonts. Or you can manually
add them to the xfs font path and use a TrueType aware font server (i.e.
XF86 4.x).

However, your X fonts won't be seen by fontconfig aware stuff through
the same path that normal X apps use. Typically though, they will get
picked up, as fontconfig is configured to scan the standard X
directories by default. God help you if you were trying to make use of
X's rapidly fading network transparency, and had your X fonts installed
on a different machine...

> Can anyone direct me to a good primer on the subject so I can kick some
> sense back into Gnome?  (I've read the Font-HOWTO, but that just covers
> installation and use of different types of font - it doesn't mention
> Gnome.)

The whole thing is such a godawful mess that no sane primers exist any
more, AFAICT. Personally, on my machine, I fiddled with it all until it
looked OK, and then left it the ***k alone :-).

Since then, apt-get upgrades have somtimes caused things to change
appearance. I've convinced myself this is "interesting", and adds
variety to life. Fixing it is usually more pain than its worth, and
makes it infinitely more likely to break worse with the next package

X fonts used to look ugly, but had a clean underlying architecture.
These days, they look better, but the underlying architecture is ugly.
Though I like the look of GTK/GNOME apps, I sometimes wonder if we're
not losing the things that made UNIX beautiful in a misguided attempt to
win a popularity contest. Maybe I'm just too much of a cynic....

> P.S.  As a subsidiary question, how does one change the window manager
> you use in Gnome 2.4?  There used to be a tool to do this in the
> Configuration Manager but now, although there are tools to configure
> each installed window manager, the one to change window manager seems to
> have faded away.

I confess that I use GDM, set it to default to "Xsession" create my
~/.xsession file, and have as little to do with GNOME as I can manage.

Hope this doesn't generate too large a headache,


Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list