1. Install the Microsoft Fonts using this command:
sudo apt install ttf-mscorefonts-installer -y
2. Create the following directory and the fonts.conf file:
mkdir -p ~/.config/fontconfig/
then
vim ~/.config/fontconfig/fonts.conf
now paste this setting:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
<edit mode="assign" name="embeddedbitmap">
<bool>false</bool>
</edit>
<edit mode="assign" name="hinting">
<bool>true</bool>
</edit>
<edit mode="assign" name="hintstyle">
<const>hintslight</const>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
</fontconfig>
3. Run these commmands:
# Reconfigure fontconfig
sudo dpkg-reconfigure fontconfig-config
# Regenerate fonts cache
sudo dpkg-reconfigure fontconfig
Or just run
sudo fc-cache -fv
4. Reboot your PC.
sudo reboot
5. Open GNOME Tweaks and set the following:
Interface Text: Ubuntu
Document Text: Ubuntu
Monospace Text: MesloLGS NF (or any of the ttf-meslo-nerd)
Rendering (Hinting):
Slight
Antialiasing:
Subpixel (for LCD screens)
6. Optional (Highly Recommended)
Using the FREETYPE_PROPERTIES option for bolder fonts (less pixelated, more like Windows TrueType):
- Enter the following command in the terminal:
sudo vim /etc/environment - Copy and paste the following:
# Better font rendering FREETYPE_PROPERTIES="cff:no-stem-darkening=0 autofitter:no-stem-darkening=0" - Save the changes and reboot the machine
Quick Note
I highly recommend you check out the Debian Post Install guide first If you haven’t yet.