How to make Firefox honour the configuration to disable font hinting for a single font

firefoxfontconfigfontsx11

I am using Debian GNU/Linux version 8 with LXDE. Regarding fonts, I have my system configured to use anti‐aliasing, subpixel rendering, and full hinting. However, I want to disable hinting for Liberation Serif, but it does not work in Firefox. Firefox still uses full hinting for Liberation Serif. However, Liberation Serif is correctly shown as non‐hinted in other programs (I checked in Gucharmap, Leafpad and LibreOffice Writer).

How can I disable hinting for all serif fonts or just Liberation Serif in Firefox?

I have hinting set to full with the customizer that comes with LXDE and the following code in ~/.config/fontconfig/fonts.conf and ~/.fonts.conf (the later is a symbolic links to the former):

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family"><string>Liberation Serif</string></test>
    <edit name="hintstyle" mode="assign">
      <const>hintnone</const>
    </edit>
  </match>
</fontconfig>

Thanks.

Best Answer

Go to about:config Find the preference gfx.font_rendering.cleartype_params.rendering_mode Change its value (probably -1) to 1

1 turns anti-aliasing off. You might also want to try 2 and 3.

4 and 5 are not your friends, they involve anti-aliasing.

That turns off both anti-aliasing, and font-hinting.

OR You Can Try Belows

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
</edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family"><string>Liberation Serif</string></test>
   <edit name="autohint" mode="assign">
   <bool>false</bool>
   </edit>
  </match>
</fontconfig>