Consolas Font On Ubuntu
Consolas is a nice to have font for programming. It is available by default on all versions(after win XP) of windows operating systems. If you are on Linux and want to use this font, the following are few easy ways to get it.
Before we move further have “font Manager” and “cabextract” installed on your ubuntu box.
sudo apt-get install font-manager |
sudo apt-get install cabextract |
Option 1:
If you could get your hands on any windows machine, go to C:\Windows\Fonts folder and just copy the consolas font onto any removable media. Copy that font file on the linux machine(no specific location, can do it anywhere) and install it using “Font Manager” application.
Option 2:
This procedure involves running the following script. The script downloads the powerpointviewer executable from the microsoft site and extracts it’s contents. After the extraction you just have to install consolas font from the extracted folder. The extracted folder has other files and fonts, you could install all the fonts if you wish and delete the folder.
Create a file named consolas.sh on your desktop and copy paste the following contents into that file:
#!/bin/sh set -e set -x mkdir temp cd temp wget http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe cabextract -L -F ppviewer.cab PowerPointViewer.exe cabextract ppviewer.cab |
Use Ctrl+Alt+T shortcut to open the terminal, change the directory on the command line to Desktop
now execute the shell script using the following command:
bash consolas.sh |
after the program runs successfully, you can open the temp folder on the Desktop and install the fonts using font manager application. Happy coding 🙂