Skip to content

Instantly share code, notes, and snippets.

@finalfantasia
Last active March 20, 2024 22:53
Show Gist options
  • Star 24 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save finalfantasia/129cae811e02bf4551ac to your computer and use it in GitHub Desktop.
Save finalfantasia/129cae811e02bf4551ac to your computer and use it in GitHub Desktop.
Fixing Text Anti-aliasing in Fedora
  1. Add the RPMFusion repositories (both free and non-free) to the YUM repository directory (/etc/yum.repos.d/):
sudo dnf localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
  1. Install the patched version of FreeType with subpixel rendering enabled:
sudo dnf install -y freetype-freeworld
  1. Create the symbolic links in /etc/fonts/conf.d as follows:
sudo ln -s /usr/share/fontconfig/conf.avail/10-autohint.conf
sudo ln -s /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf
sudo ln -s /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf
  1. Change text anti-aliasing and typeface hinting settings as follows (no sudo is required):
gsettings set org.gnome.settings-daemon.plugins.xsettings antialiasing rgba
gsettings set org.gnome.settings-daemon.plugins.xsettings hinting slight

The values above work best for me so feel free to try the values other than the above that work best for you:

  antialiasing: can be any of "none", "grayscale", or "rgba"
  hinting:      can be any of "none", "slight", "medium", or "full"

Of course, you can reset these settings to their default values if you think you might have messed things up or would like to start from scratch, etc.:

gsettings reset org.gnome.settings-daemon.plugins.xsettings antialiasing
gsettings reset org.gnome.settings-daemon.plugins.xsettings hinting
  1. Restart applications for these settings to take effect if they were running when making these changes (usually not necessary).
@sharpordie
Copy link

It seems to work like this with Fedora Workstation 35.

# Handle the package installation.
sudo dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install -y https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf update -y && sudo dnf install -y freetype-freeworld

# Create the needed symbolic links.
sudo ln -fs /usr/share/fontconfig/conf.avail/10-autohint.conf /etc/fonts/conf.d
sudo ln -fs /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d
sudo ln -fs /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d

# Change the default settings.
gsettings set org.gnome.desktop.interface font-antialiasing 'rgba'
gsettings set org.gnome.desktop.interface font-hinting 'slight'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment