This is a short “how to” article on how to get and install the new Microsoft Consolas Monotype font – this is a very nice programmer font and as described in Dan Benjamin’s “Top 10 Programming Fonts” it is highly recommended for use in your programmer’s editor or IDE (As a side note, his top selection, Inconsolata is also very nice and I highly recommend it if you don’t feel like using Microsoft created software and/or aren’t interested in performing the steps below which may or may not be legally problematic).
The main problem with using Consolas on your Linux workstation, is that this font is provided by Microsoft, and while if you are running MS-Windows (or even Mac OS-X) it may already be installed – as it is bundled with many Microsoft products, us in the Linux world have no easy (and legal) way to get to use Consolas in our code editing. Unlike Microsoft Core Fonts for the Web Consolas is not available for download – probably for the same reason the core fonts packages were pulled. But as Consolas is bundled with many Microsoft products, some are available for free download for anyone, we can use that to get us some nifty Consolas prettiness in our day to day Linux computing.
The following steps will allow you to get Consolas on your system rather easily (assuming you don’t flinch at using a terminal) and without installing any Microsoft products. I’m pretty sure its also legal to do so, even when taking into account Microsoft’s EULA, and a discussion of this is at the end if you are interested. Well, into the fray!
you need to have the following software packages installed. If you don’t already have them installed, they are available for all Linux operating system, probably using your built-in software management UI, such as Ubuntu’s Software Center or Fedora’s Software Management.
- Wine – the Microsoft Windows compatibility layer for Linux
- cabextract – a Microsoft cabinet file format extractor
After you have these installed, lets start going to the Microsoft download center and downloading the latest edition of the freePowerPoint Viewer. In the page linked, click on “Download” and download the resulting file to somewhere on your computer. The default download location for Fedora is the “Downloads” directory and for Ubuntu it is the “Desktop” directory.
Next, let’s open a terminal window (“
gnome-terminal” if you are running a GNOME desktop, or “
konsole” if you are running a KDE desktop), and follow these steps:
mkdir tmp– Create a temporary directory. The process involves creating a “wine prefix” and unpacking some files into it, and I wouldn’t want to mess up an existing wine setup if you have one.
cd tmp– move to the new temporary directory.
WINEPREFIX=$(pwd) wine ~/Downloads/PowerPointViewer.exe /extract:c:\\– ask the PowerPoint Viewer, nicely, to extract its content to what Windows call “C:\” instead of installing it. Wine will setup a simulated “C: drive” inside your temporary directory and will then run the installer – you will have to read and agree to the PowerPoint Viewer EULA, but I don’t think you have anything to worry about (see the discussion below). For this command I’m assuming you’ve downloaded the PowerPoint Viewer executable to the “Downloads” directory. If this is not the case, you may change the command appropriately.
cabextract drive_c/ppviewer.cab -F 'CONSOLA*'– The installer has put a “Microsoft Cabinet file” into the simulated “C: drive”, that contains the files we need, so here we extract the Consolas TTF files from the cabinet.
rename 'y/A-Z/a-z/;s/consola/Consolas /;s/b/Bold/;s/i/Italic/;s/z/Bold Italic/;s/ \./ Regular./' *.TTF– Optional step – rename the extract files to something that a looks humanly readable. Unless you want to keep the TTF files for future use, you can skip this step.
Now you can install the new fonts – open a file browser and go to your temporary directory. Under GNOME you can install the fonts by opening the font file and the font viewer window should have an “Install Font” button at the bottom right corner. Under KDE, right click the font files and select Actions->Install… and in the dialog that opens select “Personal” to install the font only for you or “System” to install the font to all the users (this will require a system administrator password). After you complete this step for all the TTF files that were created, you can copy the files elsewhere if you want to save them as backup for when you want to reinstall your computer. Finally it is recommended to remove the temporary directory and all its content – you have no further need for this.
I am not a lawyer and the following is not actually a legal argument, but lets try to look at the above procedure through the Microsoft EULA that you have to agree to in order to get the files:
Please note that after extracting the TTF files, you may not distribute the files, i.e. copy them to other people – this is strictly prohibited both under copyright law and under paragraph 1.b of the EULA, because it will not be “complete and unmodified” copies of the PowerPoint Viewer. You may, though, distribute copies of the original PowerPoint Viewer download to friends along with these instructions :-).
Regarding the legality of extracting files from the installer, the Microsoft EULA has this to say: “You may not work around any technical limitations in the software” – but we didn’t work around any technical limitations: the Microsoft software itself extracted the files for our use, so there is no technical limitation prevent us from copying files off the installer.
The PowerPoint cabinet also contains all the other fonts of the Microsoft ClearType font collection, of which only Calibri would be of any interest to users, the rest aren’t that interesting but then again – I hate serifs (interestingly all of the ClearType font collection fonts start with “C”).
- Manage & Compare Fonts Easily With Font Manager [Linux] (makeuseof.com)
- Free TTF font site (xpjimt.wordpress.com)
- Get The New ICS Font Roboto On Your Android Device Right Now (androidpolice.com)