Re: Per application settings in .fonts.conf?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12-12-10 07:26 PM, Wendell P wrote:
> 
> You can make application-specific settings in ~/.Xresources with syntax
> like:
> 
> xterm*background: #FFFFFF
> xterm*foreground: #000000
> xterm*font: <some font>
> 
> Is it possible to make settings for specific applications in
> ~/.fonts.conf? If so, what is the syntax? For example, how would I
> change this to apply only to a specific app?

Depends on the toolkit that calls into fontconfig.  In Pango I made that
possible.  The syntax is, for example:

    <match target="font">
                <test name="pangoprgname" mode="eq">
                        <string>pango-view</string>
                </test>
                <edit name="matrix" mode="assign">
                        <times>
                                <name>matrix</name>
                                <matrix><double>1.4</double><double>0</double>
                                        <double>0</double><double>1.4</double>
                                </matrix>
                        </times>
                </edit>
     </match>

There's nothing magical here.  Pango simply calls g_get_prgname() and sets the
"pangoprgname" element in the FcPattern to the prgname...  Other toolkits can
do the same.  One day we may even drop the pango prefix...

behdad





> <?xml version='1.0'?>
> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
> <fontconfig>
>   <match target="font">
>     <edit mode="assign" name="antialias"><bool>false</bool></edit>
>   </match>
> </fontconfig>
> 

-- 
behdad
http://behdad.org/
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig


[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux