If there’s one aspect of Linux that has more Wild West in it than a typical Charles Bronson movie, it’s fonts. Linux fonts. This is something that we all take for granted, in fact so much granted, it’s almost Cary Granted, see what I did there, and yet, the reality isn’t all Rosie O’Donnell.
Today, I would like to discuss the management and beautification of font rendering in Linux. On one hand, we want to have pretty fonts, and make sure our eyes do not tire even after a long day staring at a screen. On the other, we want Linux fonts to be better as a strategy.
Ubuntu and Windows
Without trying to provoke fanboyism, I believe that most people will agree Windows fonts, as well as those used in Ubuntu, have a superior clarity compared to most other Linux distributions. The reasons may be many, including legal sabrerattling, but the simple fact is, the way letters are drawn on your screen differs significantly from one desktop to another, and, on average, across the widest range of devices, graphics cards, and monitors, Ubuntu has the upper hand, and so does the proprietary system called Windows. Facts of life.
This, on its own, isn’t a biggie. Because if we could all agree that Ubuntu has the best way of doing it, then why not use Ubuntu fonts? Problem solved. Well, in a way, that is a part of the solution. Indeed, why not do that right now.
Take a look at the three images below. The top one shows the default Mint fonts. The middle one is of the same fonts with no hinting. At the bottom, we have full hinting. You can see a big difference in how the fonts show up on the screen. If you don’t, you are a happy reader. Or your monitor might be configured in a way that does not show the subtle differences. Another reason is that Mint, based on Ubuntu, already comes with a solid font baseline.
But then, you can achieve a more drastic result just by changing fonts. I have praised Droid Sans way back when I tested Fedora 12 and Moblin, and that impression remains, and I am backed by lots of positive feedback from the general community across the Web. So Droid Sans it is, and lo and behold, the crispness arriveth.
If you are still unhappy, then you can try the following trick. We will install Infinality, a set of font patches that lets you change your fonts to look like OSX, Windows, Ubuntu, iOS, and other operating systems. Specifically, there’s a PPA available for Ubuntu-based systems.
sudo add-apt-repository ppa:no1wantdthisname/ppa sudo apt-get update sudo apt-get install fontconfig-infinality
I tried Infinality in various guises, and did not see much difference between the available choices. Again, when the default set is good enough, you won’t need any tweaks. This is how it should be, unfortunately, the overall Linux landscape is far from this Utopia.
For Fedora and friends, there’s more work to be done. Namely, you will need freetype-freeworld fonts, which might necessitate an extra repo. Moreover, you might need to make manual adjustments to the anti-aliasing and hinting. This means playing with xrdb and the ~/.Xdefaults file. Only for the brave.
dnf install freetype-freeworld
Now, the biggie
All right, so we have learned how to fiddle with fonts and improve the looks. That is a tactical workaround for a much more serious issue that we all have. There is no simple, consistent, easy way to manage fonts in Linux. We are dealing with a legacy of thirty odd years of X Windows, seven or eight different desktop environments and managers all piled up together, and licensing limitations and restrictions that prevent a unified, common theme across all distributions.
If you look at Windows, no matter which version, overall, you will get pretty much the same results on the font front. You may use different monitors, with different sizes, you may use different graphics cards, but in the end, you will not really worry about fonts. Likewise, Ubuntu does the same thing. On average, you won’t think about fonts, you won’t mess with them, and for most people under most conditions, the default set will be the optimal set.
Branch away into Fedora, openSUSE, Mint, Arch, Manjaro, and you hit a big problem. Just search for something like “linux better fonts” and you will get a hundred forum posts trying to resolve this issue. Worst of all, they try to resolve the issue in a hundred different ways.
Not only do you not get a consistent approach to aesthetics, the fonts settings that are available and visible through the GUI settings menus and wizards vary between distributions, with some offering more tweaking and freedom and others less. Furthermore, each distribution has its own way of handling fonts, so you may need to edit this or that hidden file in your home directory or the system tree. But it gets worse.
The end result will also be different, even if you try to use the same settings, because the distros and their desktop environment all behave in their own unique way. Finally, working with configuration files is a nerdy task that the average user should never need to do.
Simplicity and ease of use
To demonstrate, just compare the exercise we did earlier with the one in openSUSE. The menus are different. The options are different. The settings are different. The results are different. You need to be well familiar with KDE or Plasma, but you also need to master Cinnamon, if you wish to enjoy your fonts the same way. This translates functionality into administration. Rather than consuming the system resources, you are fixing them.
One font strategy to rule them all
Paving the road ahead is always a tricky task. But having standards and common rules always helps cut down the cost. In our case, it can be development time or maybe QA. However, if there were one set of fonts and a consistent way of managing them that could be applicable to all distributions without reinventing the wheel or just presenting the X commands in a slightly different manner, we would benefit from an enhanced user experience.
Moreover, think of new users, who are already accustomed to Windows fonts. Once you give them Fedora or Debian, they will be disappointed. And it may even happen on a subconscious level, because they may not understand fonts, but they sure understand the input from their eyes. In the long run, it will be the simple things that deter people from using Linux, not the technology. The underlying bits and pieces are largely irrelevant.
We could try to justify the current situation by blaming Microsoft and patents, by arguing about copyright and legal obstacles, debate one font type versus another, and a million other techno details, which don’t really help us in any way. Even if you believe your own distro has superior clarity and presentation, the rest of them don’t, so as a WHOLE, the Linux ecosystem has a problem, because you cannot easily replicate your experience – be it good or bad – with another distro. What we want is the same thing everywhere. Hopefully done in a good way.
In a way, we are privileged. The fact we are discussing fonts means we’ve overcome all the other, more teething problems. But that does not make the problem any less important. The risk of Linux imploding or stagnating or not ever growing remains the same. Improved technology brings about improved expectations, and the users will not put up with any sort of font nonsense. The fact you gave them live distros that can initialize all their hardware without a hitch won’t cut it any more. People have accepted it as the new reality, and now, the challenges are much subtler, much deeper. Fonts seem to be one of those little, neglected things, but just an annoying little mosquito bite, you can’t ignore it for long. Food for thought. And hopefully, a crisper future.