[Fontconfig] Re: fc-cache sometimes looses fonts
Patrick Lam
plam at MIT.EDU
Tue Nov 1 08:51:20 EST 2005
James Cloos wrote:
>>>>>>"Patrick" == Patrick Lam <plam at MIT.EDU> writes:
>
>
> Patrick> I think it's one per directory; after all, all fonts in the
> Patrick> same directory have the same pathname!
>
> Somehow as I was writing that missive I was thinking that the string
> passed to open(2) would have to remain around. Obviously it can be
> free(2)d, so that isn't really an issue.
However, every time you ask for the font filename, you're going to have
to create a copy of that filename and keep it around. I can't think of
a way to avoid that, unfortunately; embedding a pointer to the filename
in the FcPattern and destroying it in FcPatternDestroy is probably least
bad.
pat
More information about the Fontconfig
mailing list