[Fontconfig] Unavailable foundry prefers fonts without any foundry value

Keith Packard keithp at keithp.com
Mon Sep 8 06:00:17 EST 2003


A pattern including a foundry which isn't present in the configuration ends up preferring fonts which have no known foundry set rather than a font which otherwise matches the pattern.

$ fc-match courier:foundry=adobe
FreeMono.ttf: "FreeMono" "Medium"
$ fc-match courier
cour.pfa: "Courier" "Regular"

(the last font has foundry "ibm" on my machine)

This seems wrong to me; but of course 'courier' is a special case as many 
foundries supply a font with that family name.

The question boils down to the precedence among the matching values, we 
placed FC_FOUNDRY ahead of FC_FAMILY before the weak/strong value 
distinction was created.

Can anyone think of a scenario where the foundry name would be more 
important than the family name?  Moving the foundry below the weak family 
binding solves this problem nicely.


More information about the Fontconfig mailing list