[Fontconfig] Problem when <alias> is followed by more than one <family>
Akira TAGOH
akira at tagoh.org
Sun Jan 15 18:00:50 PST 2012
See the document. <alias> allows to have only one <family> and one of
<prefer>, <accept> or <default>. the behavior is surely following what
the document says.
On Sun, Jan 15, 2012 at 4:24 AM, lolilolicon <lolilolicon at gmail.com> wrote:
> 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?
> _______________________________________________
> Fontconfig mailing list
> Fontconfig at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/fontconfig
--
Akira TAGOH
More information about the Fontconfig
mailing list