i'm running Ubuntu Jaunty alpha and it seems that fontconfig places its configuration (or cache?) files in /home/.fontconfig directory which doesn't match FreeDesktop directories specs : The default for $XDG_CONFIG_HOME is $HOME/.config, the default for $XDG_DATA_HOME is $HOME/.local/share. So all applications should look for those environment variables and use those default values if the variables are not set. This is quite important since it's not possible to easily backup config & data files if these files are not stored at the right place See http://www.freedesktop.org/wiki/Specifications/basedir-spec See also http://ploum.frimouvy.org/?184-cleaning-user-preferences-keeping-user-data (main post and comment#8)
I'm not sure where should we place the cache files according to the XDG specs. Any idea?
There is a single base directory relative to which user-specific non-essential (cached) data should be written. This directory is defined by the environment variable $XDG_CACHE_HOME. http://standards.freedesktop.org/basedir-spec/latest/ar01s02.html
Thanks. Something to look into for 2.8
*** Bug 25378 has been marked as a duplicate of this bug. ***
The proposed patch for this: http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=bz20411 That would be nice if you can test that tree for this issue.
One concern on this patch is the config files can't be shared with other boxes keeps using older fontconfig. due to the change of the order of the directory to give it priority for storing the caches, "$XDG_CACHE_HOME" dir is created on older release. Is it maybe better having the kind of 'prefix' attribute in <include>, <dir> and <cachedir> to set $XDG_{CACHE,CONFIG,DATA}_HOME? though it's hard to avoid creating new dir on older systems and can't share the updated caches.
another idea is to add "read-only" attribute and add new one after old one: <cachedir>/var/cache/fontconfig</cachedir> <cachedir read-only="yes">~/.fontconfig</cachedir> <cachedir>$XDG_CACHE_HOME/fontconfig</cachedir> in older version of fontconfig, ~/.fontconfig is still writable to update caches but not in new version. so this way can avoids creating '$XDG_CACHE_HOME' dir at the home dir.
I'm not sure we should be that concerned about sharing /etc configuration files between machines.
(In reply to comment #8) > I'm not sure we should be that concerned about sharing /etc configuration files > between machines. Agreed, and likewise with the cache directories themselves. Just switch to the new location, and if a system has both an older and newer fontconfig, then they'll keep their caches in different places.
(In reply to comment #9) > Agreed, and likewise with the cache directories themselves. Just switch to the > new location, and if a system has both an older and newer fontconfig, then > they'll keep their caches in different places. Well, there are no changes in the cache file format this time. the cache file itself is completely compatible with the older version. this is totally the configuration issue since fontconfig basically doesn't have hardcode path in the binary. and I'd avoid extra time to regenerate the cache files due to the changes of cache dir for the user space if any. this is why I want to keep the older places in the configuration somehow. If we don't need to worry about creating '$XDG_CACHE_HOME' dir when using on older fontconfig, that's okay. though it still looks ugly to me.. even though I made this patch ;o)
Another try: http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=bz20411-2 That somewhat looks better to me than the previous one.
Okay, merged into master.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.