Re: Pango error with Gaim



On Thu, 2005-11-17 at 01:07 -0500, Karim Zaki wrote:
> Dear all,
> 
> I'm compiling Gaim for my Mac OS X. I reached the stage of having
> compiled, made and installed Gaim along with all its dependencies,
> including Pango and Cairo. Now when I come to start Gaim, I get the
> following:
> 
> $ /usr/local/bin/gaim
> 
> Pango-ERROR **: Unable create Cairo font
> aborting...
> Abort trap

This error usually means that the fontconfig database is pointing
to a font that doesn't exist on your system. You might want to examine
the output of 'fc-list - family style file', though it may be hard
to figure out what font it's trying to load if you have a lot on
your system.

I've had some problems with bugs in the recent devel snapshots of
fontconfig ... if you grabbed one of those, make sure you have
run fc-cache on your font directories explicitly ... the
implicit cache file in ~/.fonts.cache-2 doesn't really work.

Regards,
					Owen

P.S. - I don't like at all that Pango is vulnerable to this problem.
There would be two ways to try to make things better:

  1. If cairo_scaled_font_create(), create a "dummy font" that 
     sizes and returns characters as if it was all boxes. This is
     going to be pretty hard because the shapers expect to be
     able to get a FT_Face for a font.

     Or, a variant of this, have such a font distributed with Pango
     (perhaps even built into the binary) and use that for the
     result of pango_fc_font_lock_face().

 2. Try to catch the problem earlier when we can do something about
    it... unfortunately, it hurts a lot to actually load a font
    off disk that we aren't using. Maybe in 
    
     pango-context.c:get_shaper_and_font_foreach()

    There could be a call to a pango_font_validate() or something
    before a font is chosen for a character. The simplest validation
    would just be a stat() on the filename from the FT_Pattern.
    Or you could go further and actually call
    cairo_scaled_font_create() at that point the first time you
    use a particular filename - that would catch permission problems - 
    right now I think making a font under /usr/share/fonts not
    readable to users is an easy way to get Pango to assert as
    above.


Attachment: signature.asc
Description: This is a digitally signed message part



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