<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<selectfont>
<rejectfont>
<pattern>
<patelt name="family">
<string>Nimbus Mono PS</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
</fontconfig>
Edit ~/.config/fontconfig/fonts.conf and make your changes there. That way, a new fontconfig update will not override your settings.
Or create new file in /etc/fonts/conf.d instead of editing the existing ones. If you start the filename with 99- (e.g. /etc/fonts/conf.d/99-custom.conf), it will be parsed last, and will override existing .confs.
The wiki also suggests /etc/fonts/local.conf, but I couldn't confirm if that's still valid from fonts.conf man page.
]]>I'm having some trouble configuring fontconfig. By default, when a website use the "monospace" font in its CSS, it is mapped to the "Nimbus Mono PS" font which I find quite difficult to read for code snippets and other formatted contents. I edited the files in /etc/fonts/conf.d to remove this mapping and use "DejaVu Sans Mono" instead. This works well except that when the fontconfig package is updated, the files are reset to defaults and the mapping to "Nimbus Mono PS" is back. How can I make sure the changes I do remain after a package update?
]]>