Friday, May 05, 2006

OpenBSD Terminal - Adding Font

Most of the time I use either mrxvt or rxvt, and the default font is killing my eye when I launch rxvt in my OpenBSD box. It is better to change the font type for better view. Here's the quicky, I like how the linux font project - lfp font type looks like and that's quicky to get it work.

Download the lfp-var and lfp-fix at

http://sourceforge.net/project/showfiles.php?group_id=3465


Then untar and install it easily

shell>bzip2 -d lfpfonts-var-src-0.84.tar.bz2 | tar xf -

shell>bzip2 -d lfpfonts-fix-src-0.83.tar.bz2 | tar xf -

shell>cd lfpfonts-var-src/src

shell>compile

After compile, you may fine lfp-var directory in lfpfonts-var-src directory. Do the same with lfpfonts-fix as well, and now you need to copy them to the font directory

shell>cd .. && cp lfp-var /usr/X11R6/lib/X11/fonts/

Again copy the lfp-fix that you have after compiling it to /usr/X11R6/lib/X11/fonts.

Then add the lines below to the File Section of xorg.conf which located at /etc/X11

FontPath "/usr/X11R6/lib/X11/fonts/lfp-fix:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/lfp-var"

Now you can run

shell>xset fp+ /usr/X11R6/lib/X11/fonts/lfpfonts-var

shell>xset fp+ /usr/X11R6/lib/X11/fonts/lfpfonts-fix

shell>xset fp rehash

To know what font types you have and make sure lfp is there, run

shell>xlsfonts

Or you can use xfontsel to select and preview the font styles.

shell>xfontsel

To add the font to the xterm or maybe rxvt, just add them to .Xdefaults under user directory. For example

# XTERM Settings
xterm*fonts: -lfp-gamow-bold-r-normal--9-90-75-75-c-90-iso8859-5

# RXVT Settings
rxvt*fonts: -lfp-gamow-medium-r-normal--9-90-75-75-c-90-iso8859-5

Here's the result, I think it is better and intuitive compare to the default font which is small.


Cheers :]