Improving font rendering, as quickly as possible

:ubuntu_mate: Introduction

:fast_forward: Guide now updated for 19.10!

If you feel like the default font rendering isn't cutting it for you, you can make font rendering look a whole lot better with a little bit of effort. Enter Infinality; a bunch of freetype patches that simply makes Linux look good.

Arguably, while font rendering might appear insignificant to a lot of people, for those who do a lot of reading, and especially for people who do a lot of coding, having the fonts appear better can lead to reduced fatigue and improved productivity.

:question: Wait, what?

Still confused? Expand below to learn a bit more.

What infiniality isn't

Let's understand this straight away; Infinality isn't a font. It is not a patch to fonts. It is an improved renderer for all fonts on your system.

What Infinality does

Wherever there is text, Infinality will most certainly make everything look better. If you're use to a certain way fonts are rendered on your system from using a different operating system, you can define which operating system's font rendering you wish to simulate, and there are a boatload of other options you can play with, most of them users really shouldn't touch but are there anyway.

:install: Installation

Adding the repositories

:clock3: It's a bit more involved this time around. Time has really taken its toll with this.

:asterisk: Regex shown for compatibility; Actual fiilenames differ slightly depending on system.

Now that you understand a little bit about what Infinality does, let's install it onto the system, with an optional fix for Java applications via icedtea;

:heavy_dollar_sign: In x-terminal-emulator:

sudo add-apt-repository -y ppa:no1wantdthisname/ppa
sudo add-apt-repository -y ppa:no1wantdthisname/openjdk-fontfix

After apt checks your system's repositories for software availability (twice) you will notice errors with the package retrieval process. This is because the repository only supports older versions of Ubuntu; that can be fixed by opening the following in your favourite text editor;

:memo: pluma shown for brevity; replace with your preference.

:heavy_dollar_sign: In x-terminal-emulator:

cd /etc/apt/sources.list.d/
sudo pluma ./no1wantdthisname-ubuntu-ppa-*.list
sudo pluma ./no1wantdthisname-ubuntu-openjdk-fontfix-*.list

For each of, modify them as follows:

:spiral_notepad: In your preferred text editor, for no1wantdthisname-ubuntu-ppa-*.list:

deb http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu disco main
# deb-src http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu disco main
deb http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu xenial main
# deb-src http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu xenial main

:information_source: The repo for xenial is the last version with the infinality font configuration tool.

:spiral_notepad: In your preferred text editor, for no1wantdthisname-ubuntu-openjdk-fontfix-*.list:

:ubuntu_mate: If you're still on 19.04, you can skip this!

deb http://ppa.launchpad.net/no1wantdthisname/openjdk-fontfix/ubuntu disco main
# deb-src http://ppa.launchpad.net/no1wantdthisname/openjdk-fontfix/ubuntu disco main

After changes have been made to both files, update available software one more time;

:heavy_dollar_sign: In x-terminal-emulator:

sudo apt update

Adding patches

Now that the repositories are available, and pointing to valid locations, do the following to install both the fontconfig patches for general use and modified openjdk patches for Java applications;

:heavy_dollar_sign: In x-terminal-emulator:

sudo apt install -y fontconfig-infinality
sudo apt install -y openjdk-8-jre-headless=8u212-b03-0ubuntu1.19.04.2ppa1
sudo apt install -y openjdk-8-jre=8u212-b03-0ubuntu1.19.04.2ppa1
sudo apt install -y openjdk-8-jdk-headless=8u212-b03-0ubuntu1.19.04.2ppa1
sudo apt install -y openjdk-8-jdk=8u212-b03-0ubuntu1.19.04.2ppa1

You will be prompted to downgrade depending on what version of Ubuntu you are doing this on. Otherwise, everything should install as expected. To prevent your version-specific changes from being overridden in the future, this should also be done:dagger: ;

:heavy_dollar_sign: In x-terminal-emulator:

sudo apt-mark hold openjdk-8-jre-headless
sudo apt-mark hold openjdk-8-jre
sudo apt-mark hold openjdk-8-jdk-headless
sudo apt-mark hold openjdk-8-jdk

:dagger: Holding packages may lead to dependency hell in the future. If you encounter issues with this software, ditch the java fix; apt-mark unhold and upgrade all instances of OpenJDK packages.

:wrench: Configuration

After that, you'll need to do a couple more things;
I do not fully understand these steps, more information is appreciated!

  • Open a terminal and use command sudo /etc/fonts/infinality/infctl.sh setstyle and select any of the styles infinality will use; Try the "Linux" style first
  • Optionally, open /etc/profile.d/infinality-settings.sh with any text editor as admin and scroll to line 712 and change the style used here; Try the "Ubuntu" style first

After that, log out, and log back in to enjoy a much better textual experience in Ubuntu MATE.

:information_source: Information sources

1 Like

A fresh coat of paint! And, a bunch more steps. If anybody finds something wrong with this, let me know! Since my time in the real world is fairly limited presently I didn't spiff up the last bit.

A sane side-by-side comparison (rather than a GIF multiple links down) would help people understand why they might want to bother with this.

AFAICT it basically just disables vertical subpixel grey / scaling (ie horizontal edges) but leaves Cleartype enabled for vertical ones. Is that right?

It's suppose to emulate a variety of font clarity hacks implemented on different operating systems, but also provide the means to use specialized or custom configurations beyond the scope of what default subpixel rendering allows.

Whether it makes a difference to anyone is debatable; it's a preference, and it's a peference which requires exaggerated examples to figure if you like anything it provides. The fact it's no longer maintained should speak volumes about how many people gave a damn, but I noticed a difference using webupd8's recommended defaults.

Thanks for the instructions for 19.10. Though aren't these configs only going to apply to the native version of Freetype that came with your system, and not the patched infinality freetype?

After following your instructions, my freetype was still the native bundled one. I had to do "sudo apt install libfreetype6" as per the instructions here https://github.com/achaphiv/ppa-fonts/blob/master/ppa/README.md

Thanks a lot.

Ubuntu 18.04 amd64 Intel i3, working fine.

The openjdk versions that you have particularly mentions asks for libc6 >= 29 version.
I installed openjdk-8-jdk through synaptic package manager with it's dependencies.
It worked fine. I didn't notice any problems yet. Feb 2020.

I'll edit this comment with an update if anything goes wrong.
Again thanks a lot for this post.

Consider replying if Infinality actually does anything for you. You might not be able to enjoy this software for too much longer considering it's a dormant, and possibly dead project. But it's nice to know for the time being it is still able to be installed.