<html><head><style>pre,code,address {
  margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}
ol,ul {
  margin-top: 0em;
  margin-bottom: 0em;
}
blockquote {
  margin-top: 0em;
  margin-bottom: 0em;
}
</style></head><body><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>on Windows I'm using prebuilt fontconfig binaries provided by the MSYS2 project. I want my app to run on systems without MSYS2, however, so I can't use the default fontconfig directories hard-coded into MSYS2's fontconfig build because they only exist if MSYS2 is installed. Luckily, I can use the environment variables FONTCONFIG_FILE and FONTCONFIG_PATH to override the MSYS2-specific configuration in the prebuilt fontconfig binaries and set my own directories for fontconfig this way.</div><div><br></div><div>However, I don't seem to find a way to set the path where fontconfig stores its cache files. It always uses the path hard-coded in the binary but this only exists if MSYS2 is installed. Is there any way to override the MSYS2 cache directory or do I have to build fontconfig myself to do that? <br></div></blockquote><div><br></div><div><br></div><div><br></div><div>In vanilla Fontconfig builds, you can set the XDG_CACHE_HOME variable to modify the cache location. Whether your MSYS2 build will respect that depends on how the MSYS2 people have patched Fontconfig.</div><div><br></div><div><span></span></div></body></html>