Re: Is there a way to set the cache directory using environment variables?

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

 



Le jeudi 10 août 2023 à 18:30 +0200, Andreas Falkenhahn a écrit :
On 10.08.2023 at 17:07 Jean Abou Samra wrote:

In vanilla Fontconfig builds, you can set the XDG_CACHE_HOME variable to modify
the cache location.

Doesn't work. Looking at the code it seems like XDG_CACHE_HOME is only handled if
there are no cache dirs in the config:

    if (config->cacheDirs && config->cacheDirs->num == 0) {
         ...
         prefix = FcConfigXdgCacheHome ();
         ...
    }

The above if statement likely evaluates to FALSE for the MSYS2 build because
MSYS2 does define a cache directory but of course I don't want to use that because
it relies on the MSYS2 infrastructure...


Looking into the MSYS2 package code at
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-fontconfig/PKGBUILD#L67
I see that this is indeed correct.

If you add <cachedir> elements to the config file, does that make a difference?

Not sure about the details of your setup, but if you create a "vanilla" FcConfig with FcConfigCreate(), it shouldn't have any of the default settings so you should be able to have complete control over it.

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


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

  Powered by Linux