[Fontconfig] On the order of test and edit elements in a match

Behdad Esfahbod behdad at behdad.org
Tue Jan 15 13:13:36 PST 2013


On 13-01-15 02:15 AM, Akira TAGOH wrote:
> That looks good to me. so do we also implement similar things for alias too?

Humm.  I don't think so.  Alias is sugar for an entire match block.

Now I remember another issue:  the code accepts alias inside a match block,
but it actually works as if the alias is outside (ie, no tests are respected).
 May be a good idea to fix that too, but ultimately, it's a separate issue.
I'll drop both in bugzilla and see if I can get them done.  That part of the
code is a bit creepy.

b

> On Tue, Jan 15, 2013 at 5:26 AM, Behdad Esfahbod <behdad at behdad.org
> <mailto:behdad at behdad.org>> wrote:
> 
>     Currently, for every match elements, all tests are evaluated, and if all
>     match, all edits are applied in order of appearance.
> 
>     I like to change this such that all test and edits are applied in order of
>     appearance simultaneously.   These are the reasons:
> 
>     1) It's more intuitive,
> 
>     2) It allows more succinct config.  You can do:
> 
>       <match>
>         <test1>
>         <edit1>
>         <test2>
>         <edit2>
>       </match>
> 
>     instead of:
> 
>       <match>
>         <test1>
>         <edit1>
>       </match>
>       <match>
>         <test1>
>         <test2>
>         <edit2>
>       </match>
> 
>     3) It allows editing the pattern and then testing based on new edited values.
> 
>     In the bitmap-scaling config I had to work around both 2 and 3.
> 
>     Thoughts?
> 
>     --
>     behdad
>     http://behdad.org/
>     _______________________________________________
>     Fontconfig mailing list
>     Fontconfig at lists.freedesktop.org <mailto:Fontconfig at lists.freedesktop.org>
>     http://lists.freedesktop.org/mailman/listinfo/fontconfig
> 
> 
> 
> 
> -- 
> Akira TAGOH

-- 
behdad
http://behdad.org/


More information about the Fontconfig mailing list