[Fontconfig] fontconfig priority management

Nicolas Mailhot nicolas.mailhot at laposte.net
Thu Oct 18 14:21:05 UTC 2018

Le 2018-10-18 08:04, Akira TAGOH a écrit :
> On Wed, Oct 17, 2018 at 10:03 PM Nicolas Mailhot
> <nicolas.mailhot at laposte.net> wrote:
>> You seem to be thinking about generating current fontconfig syntax 
>> from
>> templates in rpm macros. I definitively don't want to go there in 
>> Fedora
>> font packages. Such generators are quite brittle and hell to
>> debug/maintain. They're sort of ok for third party tools that try to
>> coax fontconfig on doing things, they're not ok as distro core
>> infrastructure. If you want to generate from rpm macros, you need to
>> define something that can be generated simply (and current fontconfig
>> syntax is not that).
> How is it that hell to debug/maintain?

Well, basically, some of the things you need to pass to fontconfig are 
structured data (for example, lists of font families a font family can 
substitute/be substituted). And rpm has no notion of structured data, 
just individual variables. So sure, you can hack something at the rpm 
macro level, but it will be ugly and awkward to use, unless you mandate 
the use of a separate config file that uses a syntax adapted to 
structured data (xml, json, yaml, whatever).

And when you get to this point, giving the config file to fontconfig 
directly, makes loads more sense. That means you can change what you do 
with the config files in a central point, post deployment even, instead 
of needing to rebuild and reinstall every single font package every time 
you have a better idea on how things should be done.


Nicolas Mailhot

More information about the Fontconfig mailing list