Setting up fonts in Linux Mint: How to make Vim look crisp like Sublime Text

Why not just get Mac OS and Sublime Text then? Well, I’m not a fan of Apple products, that’s why. I like the graphical part though so here is how to adopt some of it.

What is below was done on Linux Mint 17 with Cinnamon. This should be good for other Ubuntu flavors but, you know, be warned. This may crash your system.

First of all, better system fonts for your Linux. These are not included out of the box, probably due to licensing concerns. There are Windows and Mac OS ones.

Install Microsoft TrueType fonts

That’s pretty much it.

Install Mac OS fonts

These are not available in package and have to be installed manually. Links to the archive are fickle so look up ‘mac_fonts.tar.gz’ in Google. The archive contains the following files:

Download the archive…

…and extract it:

Now copy all the fonts to where the system will look for them:

and update system’s font cache

Install Infinality

The new fonts can be selected everywhere you like now but it’s not much use. They still will not be rendered perfectly. To address that we need Infinality.

Do not log out just yet

There is a kind of compatibility issue between Infinality and Cinnamon. If not addressed, Cinnamon fails to start. Fortunately it’s really easy to fix.

Move Infinality script from system to user profile.

Make it executable

Using your favorite editor add this line to the end of your ~/.profile

Now log out and log back in. It all should look… different now.

Default settings are reasonable but can be tweaked to personal taste. There is a number of presets and an option to create new ones. Important thing is there are two ways to set the rendering style. Although setting names are similar, the results do differ.

Use this to choose rendering style

In addition, to select a rendering preset, edit your /etc/infinality-settings.sh file.

Look up line with USE_STYLE parameter. It should be USE_STYLE="DEFAULT" now. You will see a comment above with other available presets. Try these out until you find the best one for you. You will have to do the log out/in thing for changes to take effect.

Compare text rendered by Firefox under different combinations of settings.

To my taste the combination win7 for setstyle and USE_STYLE="WINDOWS7" in the config file is the winner.

Set up terminal font

In terminal of your choice select Monaco font of size 10. For the default Cinnamon’s GNOME Terminal follow the next steps.

Open current profile preferences dialog:
profile-preferences

Clear ‘Use system fixed width font’ check box and select Monaco font with size 10:
choose-font

Vim-specific configuration is very basic, provided that you don’t use a more complex color theme like solarized. The setting is only necessary if you use Vim in terminal. For most color schemes it’s sufficient to add this to your .vimrc:

This enables 256 colors in supporting terminals. After that the code in your Vim should look very similar to the Sublime Text of the guy next to you.

You can see the osx2/OSX on the right is very smoothed out although some people may like that. For me the clear winner is win7/WINDOWS7 on the left.

That’s all, folks. Hope your Linux days become much happier with a clear and beautiful fonts all around.

Credits go to:
WEBUPD8 portal for setting up Infinality tutorial;
Danny Stieben for setting up mac and windows fonts on Linux tutorial;
SHA512 for figuring out workaround of Cinnamon startup issue;
Infinality for bringing beauty of fonts to Linux.

2 Responses to “ Setting up fonts in Linux Mint: How to make Vim look crisp like Sublime Text ”

  1. Thanks so much for putting this guide together. I was ready to give up on Linux (again) because of the fuzzy font rendering that never came close to Windows’ crispness.

Leave a Reply