Coming from the Windows world, to me, Linux font rendering out of the box just sucks. Even on Ubuntu, which people on Reddit often praise for good font rendering.
What I see is broken font rendering that makes fonts bold and blurry. Thickness is inconsistent, spacing is inconsistent and eyestrain is through the roof. Some of the typeface choices just straight up annoy me. For browsing, the
msttcorefonts package looks like some Shenzhen basement knockoff that renders poorly and doesn’t support Unicode. Try generating some Zalgo and see the empty boxes for yourself.
But there is a way. Ubuntu can have better font rendering and typefaces than Windows.
First step is to get Infinality. It is a set of patches for FreeType and adjustments for
fontconfig. I can only guess how many hours or days it must have taken the authors to figure out the configurations for all the fonts that are included.
On Ubuntu, you can get Infinality from a PPA. If you don’t know what PPAs are, I suggest that you do the research about their security implications.
To get the PPA installed, do this:
$ sudo add-apt-repository ppa:no1wantdthisname/ppa
$ sudo apt-get update
$ sudo apt-get install libfreetype6 fontconfig-infinality
The changes will only get applied when we restart X Org, so it makes sense to get through the whole process before doing that.
Unfortunately, some packages will not get the nice font rendering just yet. One of such cases is Java applications. You can experiment with Java environment variables to get the aliasing and hinting to work, or you could install another PPA from the same author:
$ sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix
$ sudo apt-get upgrade
If you use GIMP, you will notice weird artifacts in the Text Tool. Create
<edit name="rgba" mode="assign">
Ubuntu Font Family
If you use
Ubuntu Mono as your console/coding font, install
font-manager and create
<!-- Ubuntu Mono Regular -->
<test name="slant" compare="eq">
<test name="weight" compare="more_eq">
<test name="weight" compare="less_eq">
<test name="width" compare="eq">
<edit name="autohint" mode="assign">
<edit name="antialias" mode="assign">
<edit name="lcdfilter" mode="assign">
<edit name="embeddedbitmap" mode="assign">
<edit name="globaladvance" mode="assign">
<edit name="hinting" mode="assign">
<edit name="hintstyle" mode="assign">
Noto font family is an excellent font that supports all the different languages and symbols. It comes in sans, serif and monospace editions, which covers all the OS needs. Install it like this:
$ sudo apt install fonts-noto
Ubuntu provides a nice GUI to configure GNOME fonts. Other distros have all the same settings, but you may have to get your hands dirty with file editing.
- Window Titles:
Noto Sans UI Bold 10
Noto Sans UI Regular 10
Noto Sans Regular 11
Noto Mono Regular 13
I find that different applications render best with certain font sizes set. Here they are:
Ubuntu Mono 13.5
- Sublime Text:
Ubuntu Mono 13.4,
Ubuntu Mono 18,
line height 1.4
When you are browsing the internet, a lot of websites make implicit assumptions about your default fonts. If you are coming from the Windows world, a lot of websites will look weird to you. To fix it, you need to get Windows fonts. The traditional way of achieving this is through installing
msttcorefonts. I find it to be garbage for reasons stated in the preface to this post. These are not the same fonts included in your Windows installation. If you have these packages installed, ditch them prior to continuing.
The workaround is to grab the fonts from your Windows installation. I Am Not A Lawyer and if you are worried about this going against Microsoft licensing, get legal advice. I just know that it would be illegal for me to provide you with the files, therefore: the fonts are available in
C:\Windows\Fonts. You need the following files:
arialbd.ttf ARIALNBI.TTF ARIALN.TTF comicbd.ttf courbi.ttf georgiab.ttf georgiaz.ttf timesbi.ttf trebucbd.ttf trebuc.ttf verdana.ttf
arialbi.ttf ARIALNB.TTF arial.ttf comic.ttf couri.ttf georgiai.ttf impact.ttf timesi.ttf trebucbi.ttf verdanab.ttf verdanaz.ttf
ariali.ttf ARIALNI.TTF ariblk.ttf courbd.ttf cour.ttf georgia.ttf timesbd.ttf times.ttf trebucit.ttf verdanai.ttf webdings.ttf
Depending on how you access that directory, you may have to copy the files based on font family names:
- Comic Sans MS
- Courier New
- Times New Roman
- Trebuchet MS
The files go in
Now just restart X Org. Easiest way on Ubuntu is through rebooting because logging out and restarting
gdm sometimes results in weird artifacts. If you followed all the steps, after the reboot you should have better font rendering than you had on Windows.
If something doesn’t go as expected, the maintainer of the PPA covers pretty much everything in his readmes. The man is truly doing god’s work. At least that is what my eyes say.