A slightly better font rendering config
Posted: 16. Oct 2021, 16:27
How people setup their font preference is a very personal thing. It might be tailored to the monitor that they use or maybe they'd like their fonts to be extra crispy and sharp.
The following is font configuration tweaks that I apply on the machines that I run.
1. Xresources
Open the file .Xresources in our $HOME folder and add this in.
2. fontconfig
Make sure the folder $HOME/.config/fontconfig exists. Now we create a file called fonts.conf in it.
The complete path to the file would be $HOME/.config/fontconfig/fonts.conf
Add the following to it.
We can also set our user's default Sans, Serif and Monospace fonts in that file also. The fontconfig from bunsenlabs linux i.e the place I got this tweak from is there at the Resources section of this post. It shows us how to do this.
Now all that's left is to logout and log back in.
The fruits of our labor looks like this
Resources If you guys would like to share your font config or tweaks, please do so.
Cheers!
The following is font configuration tweaks that I apply on the machines that I run.
1. Xresources
Open the file .Xresources in our $HOME folder and add this in.
Code: Select all
Xft.autohint: 1
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.dpi: 96
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
2. fontconfig
Make sure the folder $HOME/.config/fontconfig exists. Now we create a file called fonts.conf in it.
The complete path to the file would be $HOME/.config/fontconfig/fonts.conf
Add the following to it.
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
<edit mode="assign" name="autohint" >
<bool>true</bool>
</edit>
<edit mode="assign" name="hintstyle" >
<const>hintslight</const>
</edit>
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
</fontconfig>
Now all that's left is to logout and log back in.
The fruits of our labor looks like this
Resources If you guys would like to share your font config or tweaks, please do so.
Cheers!