Re: Please clarify matching rules

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

 



On Sun, 16 Jul 2017 16:36:40 +0100, Colin Caine wrote:

> I would like `fc-match monospace` to give "Noto Mono". I currently
> only have Noto {Mono,Sans,Serif} and some pixel fonts installed. So
> I'm expecting `fc-match monospace` to receive "Noto Mono" or one of
> the pixel fonts. But what I actually get is "Noto Sans".
> 
> So I add:
> 
> 
>     <alias>
>       <family>Noto Mono</family>
>       <default>
>         <family>monospace</family>
>       </default>
>     </alias>
> 
> 
> But I still get Sans.

First of all, the <family> directives are the wrong way round: the
first one should contain the generic “monospace”, the second one the
specific “Noto Mono” you want to match.

Secondly, <default> places the font at the end of the match list. You
need <prefer> if you want it to go on the front.

Here’s what I tried putting in my own ~/.config/fontconfig/fonts.conf:

    <?xml version='1.0'?>
    <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
    <fontconfig>
        <alias>
            <family>monospace</family>
            <prefer>
                <family>Noto Mono</family>
            </prefer>
        </alias>
    </fontconfig>

Here’s what I got before doing the above:

    ldo@theon:~> fc-match monospace file family
    DejaVu Sans Mono:file=/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf

and here’s what I got after:

    ldo@theon:~> fc-match monospace file family
    Noto Mono:file=/usr/share/fonts/truetype/noto/NotoMono-Regular.ttf

_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://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