[Fontconfig] Problem when <alias> is followed by more than one <family>
lolilolicon
lolilolicon at gmail.com
Sat Jan 14 11:24:48 PST 2012
Hi, I need a little help understanding a <alias> config.
The font "Helvetica" is not installed on my system, but one called
"HelveticaNeueLT Pro 55 Roman" is; I like the later so I want to prepend
it before "Helvetica" and "Arial". I find that <alias> works curiously
with more than one <family> being matched.
In ~/.fonts.conf, I have:
<alias binding="same">
<family>Helvetica</family>
<family>Arial</family>
<prefer>
<family>HelveticaNeueLT Pro 55 Roman</family>
</prefer>
</alias>
then Arial is not aliased corretly:
$ fc-match Helvetica
HelveticaNeueLTPro-Roman.otf: "HelveticaNeueLT Pro 55 Roman" "55 Roman"
$ fc-match Arial
arial.ttf: "Arial" "Normal"
And if I put "Arial" at first, instead:
<alias binding="same">
<family>Arial</family>
<family>Helvetica</family>
<prefer>
<family>HelveticaNeueLT Pro 55 Roman</family>
</prefer>
</alias>
then Helvetica is not aliased corretly:
$ fc-match Helvetica
n019003l.pfb: "Nimbus Sans L" "Regular"
$ fc-match Arial
HelveticaNeueLTPro-Roman.otf: "HelveticaNeueLT Pro 55 Roman" "55 Roman"
Here, "Nimbus Sans L" is from 30-metric-aliases.conf:
<alias binding="same">
<family>Helvetica</family>
<accept>
<family>Nimbus Sans L</family>
</accept>
</alias>
If I use separate <alias> for each family:
<alias binding="same">
<family>Helvetica</family>
<prefer>
<family>HelveticaNeueLT Pro 55 Roman</family>
</prefer>
</alias>
<alias binding="same">
<family>Arial</family>
<prefer>
<family>HelveticaNeueLT Pro 55 Roman</family>
</prefer>
</alias>
then the result is as expected:
$ fc-match Helvetica
HelveticaNeueLTPro-Roman.otf: "HelveticaNeueLT Pro 55 Roman" "55 Roman"
$ fc-match Arial
HelveticaNeueLTPro-Roman.otf: "HelveticaNeueLT Pro 55 Roman" "55 Roman"
Can you help me understand what is happening?
More information about the Fontconfig
mailing list