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

Why doesn't fc-match respect my match and edit rule for Courier when it does for Consolas?



I am using Debian with XFCE.

Default behavior: No match or alias
-----------------------------------------------
First, let me show the default behavior of my system when
~/.config/fontconfig/fonts.conf has no match or alias tags.

    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
    </fontconfig>

In this case, fc-match outputs the following for Courier and Consolas.

    lone@debian:~$ fc-match Courier
    n022003l.pfb: "Nimbus Mono L" "Regular"
    lone@debian:~$ fc-match Consolas
    DejaVuSans.ttf: "DejaVu Sans" "Book"

Custom behaviour: When match is defined
--------------------------------------------------------
Now I have the following in ~/.config/fontconfig/fonts.conf.

    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
        <!-- Courier => DejaVu Sans Mono -->
        <match>
            <test name="family"><string>Courier</string></test>
            <edit name="family"><string>Deja Vu Sans Mono</string></edit>
        </match>

        <!-- Consolas => DejaVu Sans Mono -->
        <match>
            <test name="family"><string>Consolas</string></test>
            <edit name="family"><string>Deja Vu Sans Mono</string></edit>
        </match>
    </fontconfig>

In this case, fc-match outputs the following.

    lone@debian:~$ fc-match Courier
    n022003l.pfb: "Nimbus Mono L" "Regular"
    lone@debian:~$ fc-match Consolas
    DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

Question
------------
Here we see that the system has respected my substitution rule for
Consolas, but it has not respected my substitution rule for Courier.
Why is output of `fc-match Courier` still "Nimbus Mono L" and not
"DejaVu Sans Mono"?


Reply to: