[Fontconfig] The "No fonts found" error - a culprit?

Peter Chapman 16xwdqo02 at sneakemail.com
Thu Feb 27 23:12:11 EST 2003


Dear fontconfig people (Keith?),

I've just had a hassle involving fontconfig after importing some ttf fonts
from a Windows partition. The problem is well described on various
newsgroups & mailing lists but I didn't find a solution. Basically lots
of gtk+ applications (ones using pango) give the error:

	No fonts found; this probably means that the fontconfig
	library is not correctly configured. You may need to edit
	the fonts.conf configuration file. More information about
	fontconfig can be found in the fontconfig(3) manual
	page and on http://fontconfig.prg

It is widely suggested to run fc-cache again, but this didn't help me
(and apparently doesn't help a lot of people who are getting the same
error).

Eventualy I tracked the problem down to a single font, "oldengl.ttf".
Deleting this font cures the problem. I don't know if this is just a
corrupt file or actually a bug in the way it is being parsed - I thought
I'd pass the problem to someone who knows their way around the code!

Running a pango application in a debugger to highlight where the
failure is, I get to a point which shouldn't be reached (if I'm
understanding correctly):

------------------------------------------------------------------

(gdb) where
#0  FcCompareValueList (object=0x4099a83e "fontversion", v1orig=0x8832170,
    v2orig=0x887b98c, bestValue=0x0, value=0x40b51894, result=0xbfffddc4)
    at fcmatch.c:299
#1  0x40991679 in FcCompare (pat=0x87ecd18, fnt=0x88e0840, value=0x40b51894,
    result=0xbfffddc4) at fcmatch.c:374
#2  0x4099202f in FcFontSetSort (config=0x87eb5d8, sets=0xbfffdd70, nsets=1,
    p=0x87ecd18, trim=1, csp=0x0, result=0xbfffddc4) at fcmatch.c:673
#3  0x4099224f in FcFontSort (config=0x87eb5d8, p=0x87ecd18, trim=1, csp=0x0,
    result=0xbfffddc4) at fcmatch.c:744
#4  0x4084da97 in pango_fc_font_map_get_patterns (fontmap=0x874ce50,
    context=0x8837738, desc=0x8836088, language=0x8810d40)
    at pangofc-fontmap.cI:584
#5  0x4084dc96 in pango_fc_font_map_load_fontset (fontmap=0x874ce50,
    context=0x8837738, desc=0x8836088, language=0x8810d40)
    at pangofc-fontmap.cI:669
#6  0x40880928 in pango_font_map_load_fontset (fontmap=0x874ce50,
    context=0x8837738, desc=0x8836088, language=0x8810d40)
    at pango-fontmap.c:128
#7  0x4087f5e2 in pango_context_get_metrics (context=0x8837738,
    desc=0x8836088, language=0x8810d40) at pango-context.c:736
#8  0x405e1ca1 in gtk_entry_get_type () from /usr/lib/libgtk-x11-2.0.so.0
#9  0x00000002 in ?? ()
(gdb) list
294                 v = (*_FcMatchers[i].compare) (_FcMatchers[i].object,
295                                                 v1->value,
296                                                 v2->value);
297                 if (v < 0)
298                 {
299                     *result = FcResultTypeMismatch;
300                     return FcFalse;
301                 }
302                 if (FcDebug () & FC_DBG_MATCHV)
303                     printf (" v %g j %d ", v, j);
(gdb) print *v1
$6 = {next = 0x0, value = {type = FcTypeInteger, u = {
      s = 0x7fffffff <Address 0x7fffffff out of bounds>, i = 2147483647,
      b = 2147483647, d = 1642.0610351562498, m = 0x7fffffff, c = 0x7fffffff,
      f = 0x7fffffff, p = 0x7fffffff, l = 0x7fffffff}},
  binding = FcValueBindingStrong}

------------------------------------------------------------------

I think that *v1 is corrupt somehow... any ideas? I will send you the
offending "oldengl.ttf" if necessary.

Thanks!

Pete Chapman




More information about the Fontconfig mailing list