Bug 25378

Summary: Use XDG Base Directory Specification
Product: fontconfig Reporter: Cristian KLEIN <cristiklein+fontconfig>
Component: libraryAssignee: Keith Packard <keithp>
Status: RESOLVED DUPLICATE QA Contact: Behdad Esfahbod <freedesktop>
Severity: normal    
Priority: medium CC: william.jon.mccann
Version: 2_1   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Use xdg basedir spec

Description Cristian KLEIN 2009-12-01 07:47:25 UTC
Hello,

The XDG Base Directory Specification [1]. Aims at solving two issues:

1) User's home directory is currently filled with hidden files.
2) Application settings, cache and data files are not separated.

Fontconfig does not currently respect this standard.

- Fontconfig's cache should be moved to $XDG_CACHE_HOME/fontconfig, instead of ~/.fontconfig
- Fontconfig's config should be pulled from $XDG_CONFIG_HOME/fontconfig/..., instead of ~/.fonts.conf and ~/.fonts.conf.d
- Default font locations should (probably) be moved to $XDG_DATA_HOME/fontconfig

Proposed implementation:
- first step is to add support for environment variables in FcConfigFilename (src/fcstr.c) (e.g. $XDG_CONFIG_HOME/fontconfig)
- next each file where "~" is referenced should be changed to XDG_* 

[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
Comment 1 Elrond 2010-11-02 12:28:53 UTC
What is the current status of XDG Basedir support in fonctconfig?

I'm especially interested in getting ~/.fontconfig/ moved to $XDG_CACHE_HOME/fontconfig.
Comment 2 william.jon.mccann 2011-04-03 13:12:03 UTC
Created attachment 45197 [details] [review]
Use xdg basedir spec
Comment 3 Akira TAGOH 2011-09-04 22:29:34 UTC

*** This bug has been marked as a duplicate of bug 20411 ***

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.