Re: Bug in fc-cat with user cache

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


Mike FABIAN wrote:
Yes, I can confirm that it is still incorrect like Frederic writes.

What was wrong with my attached patch? I'm not sure
but I think something similar is necessary.
	    if (!FcDirCacheConsume (cache->fd, dir, set, config))

always adds the top-level directory to the list of directories
which is then used in FcConfigNormalizeFontDir(). For example it adds
the same directory /usr/X11R6/lib/X11/fonts/ many times but never
the subdirectories like /usr/X11R6/lib/X11/fonts/Type1/ ...
Replacing "dir" by "d->name" like

	    if (!FcDirCacheConsume (cache->fd, d->name, set, config))

seems to fix this because now the correct directory names area added
to the list.

I don't think it should be necessary if you don't normalize the path in the outer fc-cat loop, because you have to treat the directory anyway before you can emit the cache, which should cause the proper directory to be added to fontDirs. Clearly the present code is incorrect, and I'll look at it (since I'm now back in civilization), but I think that we can avoid the issues involved with your patch.

Also, if d->name and dir don't match, there's something wrong...

Fontconfig mailing list

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux