Comment 66 for bug 502610

Revision history for this message
In , Nicolas-mailhot-laposte (nicolas-mailhot-laposte) wrote :

(In reply to comment #47)
> (In reply to comment #46)
> > BTW from a maintenance POW I much prefer fontconfig rules which are split on a
> > font-by-font basis and only installed if the associated fonts are actually
> > available on-system

> IMHO, putting them together does not conflict with the "install-and-activate"
> idea.
>
> The source of conflict for per-font setting comes from when several upstreams
> want there fonts to be default (such as Japanese/Chinese font overwriting). If
> there is a centralized place to set the order, this may encourage them to
> communicate before chaos happens.

I does not work out this way in practice. The source #1 source of conflict if some font packager making assumptions about other fonts with insufficient info, and having a centralized place does not stop him from making those assumptions (and CJK users are terrible about it: they're so frustrated they'll write any random crap without consideration for other users as long as it works on their system). On the contrary it means it puts those assumptions in the common file, making sure to break everyone else's config, even if they did not install this package.

After a few years of looking after Fedora font packages I've never seen a centralized config file that was correct, it always reflected the bias of the last person to edit it, and it always got in the way of good packagers that tried to isolate their config without stepping on the toes of other packagers.

IMHO the only way to bring some sanity to fontconfig is to define simple clear rules, and get everyone to follow them (because fontconfig syntax is flexible enough it us really easy to shoot oneself in the foot, and no using a single centralised file does not stop that).

Such rules (again, IMHO) should be:

1. every font package includes the rules associated to its packaged font (no delegation to another package that *will* get out of sync and *will* be maintained by someone that has not got the fine knowledge about the font the actual font packager has)

2. you are forbidden to change in any way the priority of a font not included in your own package (at most you can declare your font is a valid substitute to another font)

3. you are only allowed to use reviewed fontconfig patterns in your fontconfig file (no "the rules everyone else uses are insufficient, I'll invent my own ones, it works on my computer with my set of fonts, what can go wrong?)

4. the only way fonts are priorized is the prefix of each fontconfig file, using documented rules (that means it's easy for distros to review their font setup, and change the prefix of one fontconfig file if it's wrong for them)