[Fontconfig] Making Aliases Conditional

Infinality infinality at infinality.net
Sun Nov 27 11:04:20 PST 2011


(apologies if this is a duplicate email)

I am wondering if it is possible to make alias definitions (and other 
things?) conditional on some sort of test with a <match> or something 
else.  For example:

<match target="font" >
<test name="rendering_style" qual="any" >
<string>style1</string>
<string>style2</string>
</test>
<alias>
<family>serif</family>
<prefer>
<family>Font Name 1</family>
<family>Font Name 2</family>
</prefer>
</alias>
</match>

The goal here would be to only assign the alias stuff when the value for 
rendering_style is style1 or style2.  In practice, I've confirmed that 
this block of xml will in fact /always/ assign the alias, regardless of 
the test.  I see that the definition for <match> requires a <test> and 
<edit>, not a <test> and <something else>, so it's not surprising that 
it doesn't work.

But, is there a way to accomplish what I want?  And within a single 
file?  (i.e. not having to manually split and do symlinks)

Thanks,
Erik



More information about the Fontconfig mailing list