[Fontconfig] More on expressiveness of the config language

Behdad Esfahbod behdad at behdad.org
Fri Jan 4 12:41:26 PST 2013


On 13-01-04 09:09 AM, Raimund Steger wrote:
> 
> On Fri, January 4, 2013 08:47, Behdad Esfahbod wrote:
>> I'm trying to write the uncontroversial default bitmap font resizing
>> rules,
>> but I think I'm stuck and need more expressiveness.  In particular, in
>> <test>
>> expressions I think it's useful to have a target="pattern" also.
> 
> I think in <test> that's already possible.

Ah, right.  Donno why it wasn't working for me.  New version of config coming.

Thanks,
behdad

> On a machine here with a 2.10.0 install:
> 
> With the config:
> 
>   <match target="font">
>     <edit name="pixelsize"><double>12</double></edit>
>   </match>
>   <match target="font">
>     <test target="pattern" name="pixelsize">
>       <double>66.77</double>
>     </test>
>     <test target="font" name="pixelsize">
>       <double>12</double>
>     </test>
>     <edit name="formerly_pixelsize_66.77_but_now_12">
>       <bool>true</bool>
>     </edit>
>   </match>
> 
> I get:
> 
> wlm2s092:~)fc-match -v ":pixelsize=66.77" |grep pixelsize
>         pixelsize: 12(f)(w)
>         formerly_pixelsize_66.77_but_now_12: FcTrue(w)
> wlm2s092:~)fc-match -v ":pixelsize=66.78" |grep pixelsize
>         pixelsize: 12(f)(w)
> 
> 
> 
> -Raimund
> 
> 
> 

-- 
behdad
http://behdad.org/


More information about the Fontconfig mailing list