[Fontconfig] Re: Bug in fc-cat with user cache
Frederic Crozat
fcrozat at mandriva.com
Thu Jan 12 02:35:39 PST 2006
Le mercredi 11 janvier 2006 à 15:36 +0100, Mike FABIAN a écrit :
> Mike FABIAN <mfabian at suse.de> さんは書きました:
>
> > Mike FABIAN <mfabian at suse.de> さんは書きました:
> >
> >>> And "xfd -fa" still crashes for all fonts afterwards:
> >>
> >> This crash still remains.
> >
> > Most likely because the file name reported by "fc-list" and
> > "fc-match" is wrong now:
>
> [... last directory element was always missing in the full path name ...]
>
> The problem was still there after I updated from CVS today,
> the last ChangeLog entry is:
>
> 2006-01-10 Patrick Lam <plam at mit.edu>
> * src/fccache.c (FcDirCacheConsume, FcDirCacheOpen,
> FcDirCacheValid, FcDirCacheHasCurrentArch,
> FcDirCacheUnlink, FcDirCacheRead, FcDirCacheConsume):
> * fc-cache/fc-cache.c (main):
>
> Explicitly add font dirs to config.fontDirs even if they're empty.
> Set current config in fc-cache.c.
> Fix treatment of cache directory as read from cache file; don't
> use string equality to determine if we have the right file,
> use inode equality.
>
> But this doesn't seem to have fixed it either.
>
> I made a small one line patch (attached) which seems to fix the
> problem for me. Is this patch correct?
I can confirm this patch fixes crashes people have reported on cooker
mailing list with the latest CVS snapshot I uploaded yesterday.
fontconfig was returning wrong path info to application (for
instance, /usr/X11R6/lib/X11/fonts/Vera.ttf instead
of /usr/X11R6/lib/X11/fonts/TTF/Vera.ttf ), causing pango based
applications to crash : pango / cairo don't deal really well when they
get a path from fontconfig to a inexistant file, then they ask
fontconfign for information about this file and fontconfig crashes..
--
Frederic Crozat <fcrozat at mandriva.com>
Mandriva
More information about the Fontconfig
mailing list