Monday, April 14, 2014

How to improve font rendering in Ubuntu/Mint/Elementary?

Many people have never heard of Infinality and until today I was one of them. It is a tool that greatly improves the font rendering in Linux systems.
Infinality is a set of Freetype patches. These patches aim to provide a superior font rendering for Linux and also allow easy customization. Users can adjust the settings as they please. Through Infinality you supposedly are able to emulate the font style of various Mac and Windows versions, or use the "Linux" or "Infinality" styles.
Ubuntu is considered to have a pretty good font rendering capability. That is why even though Infinality is very useful for most Linux distributions, it's usefulness is doubted in the Ubuntu case. Well there are plenty of users who install Infinality in their Ubuntus. One of them is the Ubuntu Bulgarian Translator admin Miroslav Hadzhiev(Мирослав Хаджиев). Here is something he has said concerning the matter:
"[...] this [Infinality] project has brought me back to Linux. I work with documents all day long so the fonts are VERY important to me".
He also adds that with Infinality, the fonts are sharper and more vivid  especially on large screens. Here is a screenshot provided by Hadzhiev. Here you can see his Ubuntu computer. On the left you have the default Ubuntu version but on the right you have the Infinality with Linux style.


In this picture, the change is noticeable. Using Infinality for a short period myself I must admit that at first look you won't notice the difference. It will take a little bit but you will slowly begin to see the differences. 
Here is a zoomed look at the 2 versions:


I use Elementary OS and the clearest change is seen in the Chrome tabs. Before they were somewhat blurry, now they are crisp and very vivid. Also in certain webpages the words are much better(facebook being one of them). Combined with Helvetica as a general font for the system everything looks much much better. 

How to install:

This install method is not reserved to only Ubuntu, Mint and Elementary OS. It can be done in all distros deriving from Ubuntu 12.04, 13.04 and or 13.10. Freetype with Infinality patches has its own PPA so it is not much harder than typing a few lines of code in a terminal window.
sudo add-apt-repository ppa:no1wantdthisname/ppa
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fontconfig-infinality 
 After finishing the installation, just log out and log back in. You will pinch your eyes in the first minutes to see the difference but it is there believe me. 

Configuration:

To configure it and set the style you want you just need to type the following command in your terminal:
sudo bash /etc/fonts/infinality/infctl.sh setstyle
 Choose whichever style you want and then log out and log back in again to see the effects. Linux is recommended here. If you choose the other ones remember to also use the fonts of the system Windows or OSX.

Optional: edit /etc/profile.d/infinality-settings.sh with a text editor.
To use gedit just paste this in terminal
sudo -H gedit /etc/profile.d/infinality-settings.sh
Change USE_STYLE="DEFAULT" into one of the possibilities below:


  • DEFAULT - A compromise that should please most people;
  • OSX - Simulate OSX rendering;
  • IPAD - Simulate iPad rendering;
  • UBUNTU - Simulate Ubuntu rendering;
  • LINUX - Generic "Linux" style - no snapping or certain other tweaks;
  • WINDOWS - Simulate Windows rendering;
  • WINDOWS7 - Simulate Windows rendering with normal glyphs;
  • WINDOWS7LIGHT- Simulate Windows 7 rendering with lighter glyphs;
  • WINDOWS - Simulate Windows rendering;
  • VANILLA - Just subpixel hinting;
  • CUSTOM - Your own choice;
  • Infinality styles:
    • CLASSIC - Infinality rendering circa 2010. No snapping;
    • NUDGE - CLASSIC with lightly stem snapping and tweaks;
    • PUSH - CLASSIC with medium stem snapping and tweaks;
    • SHOVE - Full stem snapping and tweaks without sharpening;
    • SHARPENED - Full stem snapping, tweaks, and Windows-style sharpening;
    • INFINALITY - Settings used by the Infinality developer;
    • DISABLED - Act as though running without the extra infinality enhancements (just subpixel hinting).


Infinality.net

6 comments:

  1. The PPA is 404-ing on me and I'm in elementary OS Luna.

    ReplyDelete
  2. It is possible to get nice font rendering on Ubuntu without infinality as well:
    http://tuxdiary.com/2014/02/09/font-rendering-ubuntu/

    ReplyDelete
  3. I am on Elementary Freya? Will this improve for this version?

    ReplyDelete