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

How to install Android on your PC, natively?


Android is the 2nd most used Operating System in the world. But if you ask anyone about it you will get answers like: "The thing I have on my phone and tablet". Android is an open source project, so its limitations are few. It if very flexible in terms of the hardware that it can run on. So what about the computers and laptops? Well, as long as there is desire there is a way. So yes there is a version of Android for computers with x86 architecture. And I am talking about the real thing running natively, not virtual methods such as BlueStacks.

So the guys at android-x86.org bring us unofficial builds of Google's OS able to run on a lot of different hardware than intended at first.
This is a project to port Android open source project to x86 platform, formerly known as "patch hosting for android x86 support". The original plan is to host different patches for android x86 support from open source community. A few months after we created the project, we found out that we could do much more than just hosting patches. So we decide to create our code base to provide support on different x86 platforms, and set up a git server to host it.

Requirements:

  • Android x86 ISO(you can download the version you want here)
  • Either a USB Flash drive or a CD/DVD(I prefer the USB, keep the planet clean!).
  • Some free gigabytes in your hard drive, this is where the operating system will installed:
    • 2Gb: From Android Froyo to ICS
    • 8Gb: For Android Jelly Bean 4.2 and 4.3
    • 10Gb: For the latest KitKat 4.4.2
  • A partition to install the new OS.
  • To burn the ISO into the USB use UNetbootin. You can download it here for Windows, Linux and Mac.
How to install:
  1. Download UNetbootin from the source above. Select the version you need.
  2. Download the version of Android x86 that you plan to install. Remember the space needed for each of them. And don't forget where you downloaded it, you'll need it in the next step.
  3. Create the bootable USB drive. To do this just start UNetbootin. Click on Diskimage instead of Distribution. Then just find ISO file that you downloaded before.
  4. After creating the bootable USB you will need to reboot you computer. You will need to boot from the USB. To do this you might need to change some settings in your BIOS or simply press a function button depending on the type of computer you have. The newer machines have USB boot by default if available.
  5. Select the partition in which you wish to install Android x86. It is recommended that you have a new and formatted partition.
  6. You will be asked to confirm some settings about GRUB Bootloader. It is imperative that you do confirm these prompts. GRUB will be your new bootloader(if you don't have it yet) from now on.
  7. Another thing you will have to confirm is the permissions of the system. You want to have a /r/w system. This is especially necessary if you would like to modify your Android x86 system later.
  8. If you have chosen to install a version from the first group(Froyo to Ice Cream Sandwich) you will be asked to install a virtual SD card. The maximum supported is 1800 MB. I recommend you to use that amount.
  9. Reboot your computer again.
And you are done. Now you have a computer with Android in it. It may not be mobile like meant by Google but it is cool all the same. Remember the GRUB Bootloader that you installed? It will allow you to boot into any OS you have installed, may it be Windows or Linux or Android.

It is also possible to do this in a virtual machine using VirtualBox for example but this is the real native experience.

Some Sources: