Re: Understanding <default> alias

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

 



On Thu, Feb 23, 2012 at 01:13:42PM +0900, Akira TAGOH wrote:
> # I forgot to Cc'ing the list. resending....
> 
> Hi,
> 
> Once building the pattern list for lookup, it won't be re-evaluated
> for matching. thus, what you need to do for what you want to do is to
> add the fallback fonts as you did for "myserif". it's the same logic

You mean <accept></accept> block for every font in the group? I am
searching for more scalable solution and, mainly, for
<default></default> usage :-) (is there any other?).

Nevertheless, I have probably found it: I didn't preserve sequence of
<alias><family></family><accept></accept></alias> and
<alias><family></family><default></default></alias> from
30-metric-aliases.conf -- I haven't consider it important until now (I
have no idea why it matters, I don't know internals of fontconfig).

        <alias binding="same">
                <family>Droid Serif</family>
                <family>DejaVu Serif</family>
                <family>Liberation Serif</family>
                <family>STIXGeneral</family>
                <default><family>myserif</family></default>
        </alias>

        <alias binding="same">
                <family>myserif</family>
                <accept>
                        <family>DejaVu Serif</family>
                        <family>STIXGeneral</family>
                        <family>Droid Serif</family>
                        <family>Liberation Serif</family>
                </accept>
        </alias>

works as I expect. I. e.

laura:/> fc-list | grep "DejaVu Serif"
laura:/> fc-match "DejaVu Serif"
STIXGeneral.otf: "STIXGeneral" "Regular"

Note that, for <default> alias, it make sense to have more 
<family> tags in.


Petr

> >       <alias binding="same">
> >                <family>myserif</family>
> >                <accept>
> >                        <family>DejaVu Serif</family>
> >                        <family>STIXGeneral</family>
> >                        <family>Droid Serif</family>
> >                        <family>Liberation Serif</family>
> >                </accept>
> >        </alias>
> >
> >        <alias binding="same">
> >                <family>Droid Serif</family>
> >                <default><family>myserif</family></default>
> >        </alias>
> >
> >        <alias binding="same">
> >                <family>DejaVu Serif</family>
> >                <default><family>myserif</family></default>
> >        </alias>
> >
> >        <alias binding="same">
> >                <family>Liberation Serif</family>
> >                <default><family>myserif</family></default>
> >        </alias>
> >
> >        <alias binding="same">
> >                <family>STIXGeneral</family>
> >                <default><family>myserif</family></default>
> >        </alias>

Attachment: pgputcyyXHaxG.pgp
Description: PGP signature

_______________________________________________
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