Daniel Hoelbling-Inzko talks about programming

Setting Source Code Pro as default font in xterm

Since I am setting up my Linux machine I decided I hate the default font provided by Ubuntu and vastly perfer Source Code Pro by Adobe for my terminal. Also the font was too small by default so I googled a bit and found the following solution to work for me with some minor changes.

First of all you have to download the font from Adobe and install it to your ~/.fonts directory and rebuild the font cache.

At the time of writing this script should do this all for you:

wget https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip -O scp.zip
unzip scp.zip
cd source-code-pro*
mkdir -p ~/.fonts
cp TTF ~/*.ttf ~/.fonts/
fc-cache -vf

Afterwards you have to create a ~/.Xresources file in your home directory that contains the following lines:

XTerm*faceName: Source Code Pro,Source Code Pro Semibold                                       
XTerm*faceSize: 12

Now run the X server resource database utility xrdb and merge the settings into your current X config. All new xterm windows will now use the new font.

xrdb -merge ~/.Xresources
Filed under linux, xterm, ubuntu

My Photography business


dynamic css for .NET