Introduction
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.
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.
Installation
Adding the repositories
It's a bit more involved this time around. Time has really taken its toll with this.
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;
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;
pluma
shown for brevity; replace with your preference.
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:
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
The repo for xenial is the last version with the infinality font configuration tool.
In your preferred text editor, for
no1wantdthisname-ubuntu-openjdk-fontfix-*.list
: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;
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;
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 ;
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
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.
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.