Customizing Fonts

From awesome
Jump to: navigation, search

In some of the nifty screenshots you see of awesome, people have added/changed fonts around. This is a quick guide on how to do this. There are several types of fonts out there available for use in X, but this will focus on xcf style fonts, which have been around for awhile.

Adding a custom font directory

1) Download the font you wish to use. It should be an .xcf format. Proggyfonts has some nice fonts that can be used.

2) Uncompress the file you downloaded. If it is a raw .xcf font, like FontName.xcf, it will need to be compressed using gzip. The following snippit can compress all the fonts in a directory:

  for x in ls *.xcf; do gzip ${x}; done

3) I have a custom font path configured just for my user in a ~/.awesome directory I created. This directory can be anywhere on your system, of course. Copy the compressed .xcf fonts to this directory.

4) cd to this directory and run mkfontdir. This will create the hints file to make X happy.

  cd ~/.awesome/fonts; mkfontdir

5) Now, tell X about the font path you just created:

  xset fp+ /home/<user>/.awesome/fonts

then tell X to reload the font information

  xset fp rehash

6) Now, run 'xlsfonts | grep <fontname>' or xfontsel, and your font should be available.

7) Finally, configure awesome to use the new font. Edit your rc.lua and add the following line:

   awesome.font = "<fontname> <size>"

If you use beautiful, change the font variable in your theme file too.


Clean Fonts

Locations of fonts that are clean to be used in awesome.

  • Proggyfonts has some nice fonts that can be used.
  • Silkscreen is a TTF block-font that is very read-able at small sizes.
Personal tools