Consolas Font in Linux for Code Editing

Consolas-Linux-Small At work I run a great Textmate theme in Visual Studio that relies on the Consolas font. The font offerings under Linux are somewhat lackluster by default, but you can easily use any TrueType fonts simply by copying the files into your fonts folder.

The Consolas font (and some others) can be found within the PowerPoint 2007 Viewer install.

You can use a CAB file extractor (sudo apt-get install cabextract, eg) to extract this executable. A second .cab file will be found among the extracted contents; simply extract it and you'll a handful of TTF files, including Consola.

Copy the fonts you want to your fonts directory; in Nautilus you can browse to fonts:///

I made Gedit's default font Consolas. I also set up my vimrc to use it. To get the line you need to paste within your vimrc, type :set guifont?.

I received the following output after manually switching to Consolas: guifont=Consolas 11 Simply paste that into your .vimrc (add a backslash after Consolas to escape the space) and Consolas will be your default editing font. consolas-linux