Bad fonts and font rendering

I am using endeavouros with KDE Plasma DE. The fonts looks bad in applications like firefox and other browsers. Fonts in firefox are okay but the fonts in chromium based browsers look bad and jagged. I had followed many instructions from other forums and websites like installing microsoft fonts from AUR, changing contents of font config file in ~/.config/fontconfig/fonts.conf. I will provide the contents of my fonts.conf file below.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!-- 19-enhanced-defaults.conf  -->
    <match target="font">
        <edit name="antialias" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="autohint" mode="assign">
            <bool>false</bool>
        </edit>
        <edit name="hinting" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="hintstyle" mode="assign">
            <const>hintslight</const>
        </edit>
        <edit name="lcdfilter" mode="assign">
            <const>lcddefault</const>
        </edit>
        <edit name="rgba" mode="assign">
            <const>rgb</const>
        </edit>
    </match>

<!-- 36-repl-liberation-fonts.conf -->
  <!-- Replace Liberation fonts with ChromeOS fonts since Fedora
       ships with very outdated version of Liberation fonts that
       doesn't render well.
       ChromiumOS fonts are basically updated versions of Liberation
       fonts so there should be no visual difference -->

  <!-- Liberation Mono => Cousine -->
  <match target="font">
    <test name="family">
      <string>Liberation Mono</string>
    </test>
    <edit name="family" mode="assign">
      <string>Cousine</string>
    </edit>
  </match>
  <match target="pattern">
    <test name="family">
      <string>Liberation Mono</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Cousine</string>
    </edit>
  </match>

  <!-- Liberation Sans => Arimo -->
  <match target="font">
    <test name="family">
      <string>Liberation Sans</string>
    </test>
    <edit name="family" mode="assign">
      <string>Arimo</string>
    </edit>
  </match>
  <match target="pattern">
    <test name="family">
      <string>Liberation Sans</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Arimo</string>
    </edit>
  </match>

  <!-- Liberation Serif => Tinos -->
  <match target="font">
    <test name="family">
      <string>Liberation Serif</string>
    </test>
    <edit name="family" mode="assign">
      <string>Tinos</string>
    </edit>
  </match>
  <match target="pattern">
    <test name="family">
      <string>Liberation Serif</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Tinos</string>
    </edit>
  </match>

<!-- 52-latin-free.conf -->
  <!-- ## Free default Latin type-faces. ## -->

  <!-- ## serif ## -->
  <alias>
    <family>serif</family>
    <prefer>
      <family>Noto Serif</family>
      <family>DejaVu Serif</family>
      <family>Tinos</family>
      <family>Liberation Serif</family>
      <family>Nimbus Roman</family>
    </prefer>
  </alias>
  <!-- ## sans-serif ## -->
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>Noto Sans</family>
      <family>Arimo</family>
      <family>Liberation Sans</family>
      <family>DejaVu Sans</family>
      <family>Nimbus Sans</family>
      <family>Open Sans</family>
    </prefer>
  </alias>
  <!-- ## monospace ## -->
  <alias>
    <family>monospace</family>
    <prefer>
      <family>Cousine</family>
      <family>DejaVu Sans Mono</family>
      <family>Noto Mono</family>
      <family>Nimbus Mono</family>
      <family>Liberation Mono</family>
      <family>Courier</family>
    </prefer>
  </alias>
  <!-- ## fantasy ## -->
  <alias>
    <family>fantasy</family>
    <prefer>
      <family>Passion One</family>
    </prefer>
  </alias>
  <!-- ## cursive ## -->
  <alias>
    <family>cursive</family>
    <prefer>
      <family>Komika Sans</family>
      <family>Signika</family>
    </prefer>
  </alias>

</fontconfig>

Wayland or X? If wayland, go to chrome://flags and:

This is vivaldi, but is exactly the same process.

I use x11 session because wayland is not usable for me in plasma 5. Btw which desktop environment or window manager are you using ?

Hyprland

Interesting. On my system this symlink is just there. I guess it was created during installation of the fontconfig package.

1 Like

been using this tutorial and guide for years, works great for me