[Fontconfig] fc-cache.patch
Mike FABIAN
mfabian at suse.de
Fri Feb 6 03:45:35 PST 2009
Mike FABIAN <mfabian at suse.de> さんは書きました:
> Behdad Esfahbod <behdad at behdad.org> さんは書きました:
>
>> fc-cache.patch: I don't think this one is needed anymore.
>
> Right. Obsolete. Was commented out in our the fontconfig.spec file
> and not applied anymore.
>
>> My testing suggests so at least. Then again, there is no
>> documentation as to what it's trying to fix.
>
> Originally this patch was from my colleague Takashi Iwai (CC:)
> his comment was:
>
> iwai> Hi,
> iwai>
> iwai> the below patch fixes the segfault of fc-cache invoked with arguments
> iwai> of non-existing directory name.
>
> I remember that we submitted this upstream but it was rejected because
> of the use of realpath(). The problem seems to have been solved in a
> different way now in fontconfig, fc-cache doesn't crash on non-existing
> directories. Therefore the patch was commented out in our .spec file.
Something which canonicalizes pathnames would be nice though, if
realpath() cannot be used, is there another way to do it?
Currently fontconfig distinguishes even between directory names
like /foo/bar and /foo/bar/ and /foo//bar although they
are all the same:
mfabian at magellan:~$ rm .fontconfig/*
mfabian at magellan:~$ fc-cache -v /usr/share/fonts/truetype
/usr/share/fonts/truetype: skipping, existing cache is valid: 972 fonts, 0 dirs
/var/cache/fontconfig: not cleaning unwritable cache directory
/home/mfabian/.fontconfig: cleaning cache directory
fc-cache: succeeded
mfabian at magellan:~$ fc-cache -v /usr/share/fonts/truetype/
/usr/share/fonts/truetype/: caching, new cache contents: 972 fonts, 0 dirs
/var/cache/fontconfig: not cleaning unwritable cache directory
/home/mfabian/.fontconfig: cleaning cache directory
fc-cache: succeeded
mfabian at magellan:~$ fc-cache -v /usr/share/fonts//truetype
/usr/share/fonts//truetype: caching, new cache contents: 972 fonts, 0 dirs
/var/cache/fontconfig: not cleaning unwritable cache directory
/home/mfabian/.fontconfig: cleaning cache directory
fc-cache: succeeded
mfabian at magellan:~$ fc-cache -v /usr/share/fonts//truetype
/usr/share/fonts//truetype: skipping, existing cache is valid: 972 fonts, 0 dirs
/var/cache/fontconfig: not cleaning unwritable cache directory
/home/mfabian/.fontconfig: cleaning cache directory
fc-cache: succeeded
mfabian at magellan:~$
Probably I kept this fc-cache.patch (but commented out
in the fontconfig.spec file) to remind me that it would
be nice to canonicalize pathnames.
--
Mike FABIAN <mfabian at suse.de> http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。
I � Unicode
More information about the Fontconfig
mailing list