Bitmap/ANSI Font Installation Help.

So, I've been looking around on Google and in the FreeBSD Handbook for the last two days in an attempt to get a single font (smoothansi) to be usable in my terminal (xterm, aterm). However, everything I've tried has not worked.

A while back, I remember adding a font to be as easy as:
1) Place font in ${LOCALBASE}/X11/fonts/whatever directory
2) Run an [cmd=]mkfontdir[/cmd] command in said directory
3) Run an [cmd=]xset fp+ /path/to/said/directory[/cmd]
4) Run an [cmd=]xset fp rehash[/cmd] command
5) Restart X

This, however, does not seem to be the case any longer. There are XML files to create/edit as well as some other stuff inside ${LOCALBASE}/etc/fonts that needs to be enabled/edited. Aside from trying the above steps, I've also added the font directory to my Xorg.conf file, I've placed the file in my ~/.fonts directory and ran an [cmd=]fc-cache -v -f[/cmd] and it seems to add it without any issue. I've installed x11-fonts/xfontsel which also sees the font as available, yet when I run [cmd=]aterm -fn smoothansi[/cmd] I get the following error aterm: can't load font "smoothansi". I'm completely stumped as to why I am unable to use this font.

The font, if anyone is interested, is located at http://ww2.purplehat.org/~ek/files/smoothansi.pcf.gz

Can someone please help me figure out what I need to do in order to use this font in X?

Thanks,
Janketh Jay
 
Restarting X will undo your [cmd=]xset[/cmd] commands. You should add those [cmd=]xset[/cmd] commands to your ~/.xinitrc file.

But this is how added the smoothansi font:

1) Placed the smoothansi.pcf.gz into my ~/.fonts directory
2) Ran [cmd=]mkfontdir[/cmd] in ~/.fonts directory (after which [cmd=]smoothansi.pcf.gz -artwiz-smoothansi-medium-r-normal--13-130-75-75-m-60-iso8859-1[/cmd] line appeared to fonts.dir file.
3) Ran [cmd=]fc-cache -f[/cmd]
4) Ran [cmd=]xset fp+ ~/.fonts[/cmd] and [cmd=]xset fp rehash[/cmd]
5) Verified that X knows about the font with [cmd=]xlsfonts | grep -i smoothansi[/cmd]:
Code:
~> xlsfonts  | grep -i smoothansi
-artwiz-smoothansi-medium-r-normal--0-0-75-75-m-0-iso8859-1
-artwiz-smoothansi-medium-r-normal--0-0-75-75-m-0-iso8859-1
-artwiz-smoothansi-medium-r-normal--13-130-75-75-m-60-iso8859-1
-artwiz-smoothansi-medium-r-normal--13-130-75-75-m-60-iso8859-1
6) Verified that freetype or whatever knows about the font:
Code:
~> fc-list | grep -i smoothansi
/home/dh/.fonts/smoothansi.pcf.gz: smoothansi:style=Regular
7) Tried to execute [cmd=]xterm[/cmd] with the new font:
Code:
~> xterm -fa 'smoothansi'
~> xterm -fn '-artwiz-smoothansi-medium-r-normal--13-130-75-75-m-60-iso8859-1'

Worked as expected.
 
Hi dh,

Thanks a ton! It works. Apparently, I just wasn't issuing the proper command(s) for the font name. I appreciate your quick reply and help.
 
Back
Top