Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 530250 - media-libs/fontconfig - 50-user.conf should be 99-zzz-user.conf so it is initialised last
Summary: media-libs/fontconfig - 50-user.conf should be 99-zzz-user.conf so it is init...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ben de Groot (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-24 00:26 UTC by Andrew Udvare
Modified: 2014-11-24 18:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Udvare 2014-11-24 00:26:28 UTC
I have found it is very difficult to configure fonts to your liking if you have other configurations (which come enabled by default) that can just override your settings simply because of the file name. fontconfig appears to go in order by file name, so it made sense to me to symlink 50-user to 99-zzzz-user.conf just be certain it loads last.

Reproducible: Always

Steps to Reproduce:
1. Configure own fonts.conf with rule that exists in a configuration higher than 50-user.conf
2. Run application affected
Actual Results:  
Rules are overwritten by rules in higher-numbered file name.

Expected Results:  
User rules should arguably be top priority.

My own fix for this is to just symlink etc/fonts/conf.avail/50-user.conf to /etc/fonts/conf.d/99-zzzzzzzzz-user.conf (and not use eselect fontconfig for this)
Comment 1 Ben de Groot (RETIRED) gentoo-dev 2014-11-24 13:17:33 UTC
This is by design. If you want local overriding configurations, you need to place them in /etc/fonts/local.conf while 50-user.conf is not meant to be edited and will be overwritten on fontconfig updates.
Comment 2 Andrew Church 2014-11-24 14:43:31 UTC
(In reply to Ben de Groot from comment #1)
> This is by design. If you want local overriding configurations, you need to
> place them in /etc/fonts/local.conf while 50-user.conf is not meant to be
> edited and will be overwritten on fontconfig updates.

I think this misses the point -- the reporter's issue appears to be that _per-user_ configurations (which are loaded by 50-user.conf) will be overwritten by global configuration files whose names are lexically later than 50-user.conf.  While it's easy enough to work around, by copying 50-user.conf into local.conf and disabling 50-user.conf with eselect, I think the expected behavior is that all per-user settings override all global settings (whether those global settings are from the distribution or in local.conf), and that's not what happens now.
Comment 3 Andrew Udvare 2014-11-24 18:14:57 UTC
Ben de Groot, I do not edit 50-user.conf at all. I just rely on the directories that are mentioned in there, in particular $HOME/.config/fontconfig/fonts.conf (so it is user-specific). 51-local.conf mentions local.conf (/etc/fonts/local.conf), but I am interested only in user-specific settings.

Referencing man fonts-conf, I am not sure what is the best way besides my workaround to  ensure user configuration is load it:

          /etc/fonts/fonts.conf
          /etc/fonts/fonts.dtd
          /etc/fonts/conf.d
          $XDG_CONFIG_HOME/fontconfig/conf.d
          $XDG_CONFIG_HOME/fontconfig/fonts.conf
          ~/.fonts.conf.d
          ~/.fonts.conf

I know the last 2 are deprecated, but is this the actual order that files get read? I will have to do more testing.