Re: blocking fonts enumeration

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

 



This is enormously helpful. Thanks so much. I never knew about global fonts.conf settings for fontconfig, and apparently like many things GIMP observes and prioritizes separate configs in its local folder. Studying fontconfig XML properties, I came up with:

<fontconfig>
    <selectfont>
        <rejectfont>
            <pattern>
                <match target="glob">
                    <dir>/usr/share/fonts/*</dir>
                </match>
            </pattern>
        </rejectfont>
    </selectfont>
</fontconfig>

Which successfully prevents GIMP from loading system fonts.

Great!

However, this somehow prevents fonts installed in the GIMP folder from loading as well. In other words, all the custom fonts are useless.

I therefore tried to do:

<fontconfig>
    <selectfont>
        <rejectfont>
            <pattern>
                <match target="glob">
                    <dir>/usr/share/fonts/*</dir>
                </match>
            </pattern>
        </rejectfont>
        <acceptfont>
            <pattern>
                <match target="glob">
                    <dir>/home/exampleuser/.gimp-2.8/fonts/*</dir>
                </match>
            </pattern>
        </acceptfont>
    </selectfont>
</fontconfig>

For some reason, this negated the rejectfont attribute entirely and all system fonts reappeared as if there were no fonts.conf file in the GIMP directory at all, as before.

Thoughts?


On 2018-07-15 04:49, Liam R E Quin wrote:
On Sat, 2018-07-14 at 12:05 +0000, 1980_underground@xxxxxxxxxxxxx
wrote:
Thanks for this!

The Linux in question is Debian.

Your solution sounds painstaking but functional.

Can I get a link to an appropriate example of a fonts.conf that does
this?

This will get rid of Helvetica:

<fontconfig>
    <selectfont>
        <rejectfont>
            <pattern>
                <patelt name="family">
                    <string>Helvetica</string>
                </patelt>
            </pattern>
        </rejectfont>
    </selectfont>
</fontconfig>

You might also be able to do it based on the directory containing the
font file, i'm not sure.

Liam (slave ankh)
_______________________________________________
gimp-developer-list mailing list
List address:    gimp-developer-list@xxxxxxxxx
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list



[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux