I decided to write a font display util using just the base vga library for
my g3fax viewer program as the gl_* stuff don't work for 16 color modes -
which is what I needed for max resolution in order to be able to view a
reasonable amount of the fax page. (See g3vga-x.y.tar.gz on sunsite.unc.edu)

Anyway besides that, this gives you the ability to use ANY font already
created for linux consoles in /usr/lib/kbd/consolefonts and loaded with the
font program `setfont' available in the `kbd-0.87.tar.gz' package. There are
also various other fonts as well as different languages character sets
available.

I hope these routines are considered for default inclusion in the svga
library.

A font pointer of size "font_t" must be allocated by the user for the
256 characters to be stored and passed to vga_initfont() routine. It is the
responsibility of the user to free the pointer when no longer required. See
the fontdemo.c program for a simple example.

Please read all the fontutils.h, miscutils.h, vgaget.h for the argument
passing information.

The bitmap utils in loadim.c tiles a region with the named xpm or xbm file.
There is an example of how to load xpm images onto 16 color vga screen. Ok so
you ask - Why did I choose XPM as a picture loadable format ?? Well the simple
answer is that XPM supports color (unlike X11 bitmaps) and it is plain text
format which makes its very easy to edit the color specifications. However
at the moment the routine just links with X11 and Xpm libraries. I will
eventually rewrite the routine to load the pixmap directly so that the extra
baggage from libX11 and libXpm are not included in the binary. The xbm (X11
bitmap format) routine will be compiled in by default into the library as it
doesn't use any external routines. The calling procedure is similar to
loadxpm() - see loadim.h file.

You can try the demo like:

	% ./fontdemo

If you have compiled with XPM support you can try

	% ./fontdemo leaves.xpm
	% ./fontdemo linux2.xpm
	% ./fontdemo nt.xpm

If you didnt compile with XPM support you can try

	% ./fontdemo escherknot
	% ./fontdemo xlogo32

In the fontdemo form you can move to the next field by pressing tab or return.
The Arrow keys are NOT recogonised (yet). Notice how the callback registered
doesn't let you leave the field unless a valid user or password has been
entered. By turning off the vga console switching routine and SIGNIT
(Control-C) this simple demo would make an excellent lock screen utility (in
my opinion anyway) - Whadda ya think ?.

Please send bugs, suggestions, encouragement etc to me.

Good luck
Mitch <m.dsouza@mrc-apu.cam.ac.uk>
----------------------------------
