Saturday, April 04, 2015

Installing Source Code Pro true type fonts for Raspbian

As programmer you need good fonts, and I highly recommend Source Code Pro. To install Source Code Pro font for single user account do the following:
  • Download latest release of Source Code Pro fonts
  • Unzip the fonts into the directory: ~/.fonts
  • Update the font cache: fc-cache -vf

I was having problem working out what the semi bold font name was, the following one liner was useful:
fc-list :fontformat=TrueType -f "%{family}\n" | sort -u | less

Add the folllowing in ~/.Xresources to use Size 11 of Source Code Pro semi bold font for xterm:
XTerm*faceName: Source Code Pro,Source Code Pro Semibold
XTerm*faceSize: 11

For the changes in ~/.Xresources to take effect without restarting X, you can do the following:
xrdb -merge ~/.Xresources

And to verify that the changes have took effect, you can do the following:
xrdb -query -all

No comments: