[Fontconfig] Debugging font selection

moseley at hank.org moseley at hank.org
Thu Jul 3 08:47:52 EST 2003

I installed some font packages and now my Window manager is displaying 
the wrong fonts.  I'm looking for help in understanding and tracking 
down the problem.

I'm running Debian/Testing with packages:  libxft2 2.1.1-2, 
xfree86 4.2.1-6, fontconfig 2.2.0-2.  I assume I'm using Render from:

  (II) Initializing built-in extension RENDER

I frankly have very little understanding of the font selection and
rendering process -- and how it works differently with different

Yesterday I installed some new font packages:

  ttf-larabie-deco - Decorative fonts from www.larabiefonts.com
  ttf-larabie-straight - Straight fonts from www.larabiefonts.com
  ttf-larabie-uncommon - Special decorative fonts from www.larabiefonts.com

Unfortunately, my window manager Icewm is now displaying somewhat 
unreadable fonts in title bars, menus, taskbar, and so on.  It seems 
like installing those fonts has messed up what font is selected for 
Icewm's requests.

I'd really like to understand fonts a bit better, so I'm wondering:

  Is there a tool (or some way) where I can see what font, say, Icewm is
  requesting and what font is actually selected (and why) and what is
  being used for rendering?

Maybe that will help me solve the incorrect font selection problem.

Back to my specific font problem with Icewm.  I tried specifying a font
that I know I have (as found by xfontsel) and it had no effect.  In my 
.icewm/preferences file I added:

  TitleFontName = "-adobe-helvetica-regular-r-*-*-15-*-*-*-*-*-*-*"

But if I disable /usr/share/fonts in the <dir> entries in fonts.conf 
like so:


Then I can indeed set the font with "TitleFontName" in Icewm's
preferences.  This makes me think it's not Icewm's problem but rather
the font selection in fontconfig.  With that directory path modified I 
can indeed select other fonts and they will display as expected.

BTW - if I select that helvetica font with xfontsel then the correct
font is shown in the xfontsel window.

A side note: I first tried selecting different Icewm "themes" to see if 
I could change the font.  There was only one theme that changed the 
fonts and it turned out to have font strings of 15 fields, not 14 like 
xfontsel offers.

 TitleFontName = "-artwiz-snap-regular-r-normal-sans-10-*-*-*-*-*-*-*-*"

I assume that's an incorrect font string, but it did change the font 

Here's the font list in my XF86Config-4 file.  I assume the <dir> fonts 
listed in fonts.conf must match up with the fonts in the XF86Config-4 
file.  Is that true?  I don't know how things work, but is it possible 
that Fontconfig is selecting a font but then X can't find the font due 
to differences in this Section?

Section "Files"
        FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
        FontPath        "/usr/lib/X11/fonts/misc"
        FontPath        "/usr/lib/X11/fonts/100dpi/:unscaled"
        FontPath        "/usr/lib/X11/fonts/75dpi/:unscaled"
        FontPath        "/usr/lib/X11/fonts/Type1"
        FontPath        "/usr/lib/X11/fonts/Speedo"


Bill Moseley
moseley at hank.org

More information about the Fontconfig mailing list