Quantcast
Viewing all articles
Browse latest Browse all 3423

[HowTo] Get Exceptional Font Rendering in Debian 12 (and in other distros)

Font rendering has always been a controversial subject in the Linux world and also a weakness of it. Things have changed nowadays and Linux distros can produce very good font rendering but no distros configure it out of the box. After a lot of trial and error and so many hours of testing, searching through blogs, and articles on the Internet, I was able to configure brilliant font rendering in my Debian 12 system. So, read on.

Disclaimer: This How-To is tested and created only for English language users. I do not use and tested this method for other languages.

Fonts
First, we will remove all the non-essential fonts from the system. That means, other than the fonts mentioned below, everything must be uninstalled. Some fonts are available in the repo, some need to be copied from an installed Windows system and the Internet.

Linux Fonts:
Make sure that only these fonts packages are installed in the system:

Code:

fonts-cantarell (optional, dependency of adwaita)fonts-dejavu-corefonts-dejavu-extrafonts-droid-fallbackfonts-liberation (optional, dependency of microsoft-edge)fonts-noto-cjkfonts-noto-color-emojifonts-noto-corefonts-noto-monofonts-noto-ui-corefonts-opensymbol (optional, dependency of LibreOffice)fonts-quicksand (optional, dependency of desktop-base and used by Debian's default grub theme)fonts-ubuntufonts-urw-base-35
Remove other installed fonts packages and their metapackages.

Windows Fonts:
Now we need to grab some fonts from Windows. So, get yourself a working copy of Windows 7/8/9/10/11.
Now, create a directory in where we will be copying the Windows fonts.

Code:

mkdir ~/windows
Now copy all of the below mentioned fonts in the directory which we created from the Windows system, including all the substyles.

Code:

arialcalibricambriaconsolascourier newgeorgiasegoe uitahomatimes new romanverdana
Other Fonts:
First create a new directory.

Code:

mkdir ~/misc
There is one one other font which is required to have and that font is infamous Helvetica, which is freely available to download. So, head over to https://freefontsfamily.com/helvetica-font-family/ and download the helvetica fonts family. Extract the zip file and copy only the .ttf files(discard .otf files) to the newly created directory.
If you want to have any other fonts, just download and copy them to this 'misc' directory. For example, I need to have Roboto family of fonts, so I downloaded them from the google fonts page and copied them to 'misc'.

The final step of this stage is to copy both directories to system so these fonts are available systemwide. To do that, run this command:

Code:

sudo cp -R ~/windows misc /usr/share/fonts/truetype/
Then refresh the fonts cache:

Code:

sudo dpkg-reconfigure fontconfig

Statistics: Posted by rhinjard — 2023-12-30 17:59 — Replies 3 — Views 29



Viewing all articles
Browse latest Browse all 3423

Trending Articles