You are not logged in.

#1 2018-09-04 18:16:34

julienfalque
Member
Registered: 2016-06-17
Posts: 24

[SOLVED] Fonts configuration reset with almost every fontconfig update

Hi,

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?

Last edited by julienfalque (2019-01-21 18:48:30)

Offline

#2 2018-09-04 19:14:37

circleface
Member
Registered: 2012-05-26
Posts: 635

Re: [SOLVED] Fonts configuration reset with almost every fontconfig update

Edit ~/.config/fontconfig/fonts.conf and make your changes there.  That way, a new fontconfig update will not override your settings.

Offline

#3 2018-09-04 20:28:24

ooo
Member
Registered: 2013-04-10
Posts: 1,607

Re: [SOLVED] Fonts configuration reset with almost every fontconfig update

circleface wrote:

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.

Offline

#4 2019-01-21 18:47:47

julienfalque
Member
Registered: 2016-06-17
Posts: 24

Re: [SOLVED] Fonts configuration reset with almost every fontconfig update

Thanks for your answers, adding a file in ~/.config/fontconfig with the following content did solve the issue:

<?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>

Offline

Board footer

Powered by FluxBB