4

I'm running Ubuntu 16.04,I have the bitmap font basis33.ttf installed in the ~/.fonts directory, and I would like to make sure basis33 does not use antialiasing. Here's my ~/.config/fontconfig/fonts.conf:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
  <dir>~/.fonts</dir>
  <match target="font">
    <test compare="eq" name="family">
      <string>basis33</string>
    </test>
    <edit name="autohint" mode="assign">
        <bool>false</bool>
    </edit>
    <edit name="antialias" mode="assign">
      <bool>false</bool>
    </edit>
    <edit name="hinting" mode="assign">
        <bool>false</bool>
    </edit>
  </match>
</fontconfig>

I then run fc-cache -rv and perform a checkup on the font:

$ fc-match -v 'basis33' family antialias autohint hinting
Pattern has 4 elts (size 16)
    family: "basis33"(s)
    antialias: True(w)
    hinting: True(w)
    autohint: True(w)

Clearly, my settings haven't been applied. Did I configure fonts.conf incorrectly? And if I haven't, is there a way I can check if fonts.conf is even being used by fontconfig?

2

1 Answer 1

2

I did a cat of /etc/fonts/fonts.conf and noticed it doesn't contain:

 <!--
        Load per-user customization file, but don't complain
        if it doesn't exist
   -->
   <include ignore_missing="yes" prefix="xdg">fontconfig/fonts.conf</include>

Ubuntu Manpage: fonts.conf

My guess is you need to add that in, a bit worrisome as the file can be overwritten apparently. Not sure if there is a way to have it generate with that configuration by default.

1
  • Nowadays, this line should exist in /etc/fonts/conf.d/50-user.conf (whose directory is included by /etc/fonts/fonts.conf).
    – Adam Katz
    Jul 28, 2021 at 3:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .