[Fontconfig] Making Aliases Conditional
akira at tagoh.org
Thu Dec 1 20:57:54 PST 2011
alias/prefer thing like:
can be replaced with:
<edit name="family" mode="prepend">
not tried but I guess there should be some docs there though, how it's
translated to test/edit things for aliases are documented in fonts.dtd
On Fri, Dec 2, 2011 at 10:43 AM, Infinality <infinality at infinality.net> wrote:
> Thanks for your response, Behdad.
> So, you're saying that it's possible to do this somehow, but not in the way
> I'm trying to do it. By "sugar" do you mean somehow assigning an arbitrary
> value and then using that to alias? I have searched quite a bit, so I'd be
> grateful is someone could provide me a simple example to work from.
> Thanks again,
> On 12/01/2011 07:37 PM, Behdad Esfahbod wrote:
>> I know aliases don't work in that situation. But aliases are just sugar
>> match/edit sequences. If you expand it to what it means, it should work
>> conditionally. Please look around for the details. Or someone else may
>> offer it.
>> On 11/27/2011 02:04 PM, Infinality wrote:
>>> (apologies if this is a duplicate email)
>>> I am wondering if it is possible to make alias definitions (and other
>>> conditional on some sort of test with a<match> or something else. For
>>> <match target="font">
>>> <test name="rendering_style" qual="any">
>>> <family>Font Name 1</family>
>>> <family>Font Name 2</family>
>>> 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
>>> block of xml will in fact /always/ assign the alias, regardless of the
>>> 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)
>>> Fontconfig mailing list
>>> Fontconfig at lists.freedesktop.org
> Fontconfig mailing list
> Fontconfig at lists.freedesktop.org
More information about the Fontconfig