
This is the alpha version of fontedit, and of its README file.

Fontedit is, obviously, a font editor; it is designed to work with
Jerry Kaidor's fontpak, which is included with the SLS distribution.

The major problem with fontpak is that the only way to create new fonts
is to use the dumpfont and makefont utilities, and it's difficult to
see the effect of your changes without going through a distracting sequence
of edit/makefont/loadfont commands.  Fontedit is a solution; it's an
interactive editor that makes designing new fonts _much_ easier.

Included in this distribution are:
      this README file,
      fontedit.c, the source code, and
      kiddy.uu, a uuencoded file containing an extremely silly sample 
font designed by Gregory P. Ward. 


	Compiling Fontedit
	------------------

Compilation is straightforward.  Fontedit uses curses, so it must be
linked with the appropriate libraries.  Obviously, your kernel must
have the fontpak patch applied for this program to be of any use,
but fontedit will run fine without it.

"gcc fontedit.c -lcurses -ltermcap -O -o fontedit" will create an
executable named "fontedit" in the current directory.  The normal
executable is 21K; the stripped executable is about 13K.


	Running Fontedit
	----------------
	
Fontedit can edit one or two fonts at the same time.  To start up,
it must be passed either one or two font names.

	"fontedit koi8.fnt koi8.fnt"

will start up the editor with two different copies of the koi8 font included
with the SLS distribution of fontpak; 

	"fontedit kiddy.fnt koi8.fnt"
	
will edit two different fonts, letting you copy characters from one font 
to another, and 

	"fontedit kiddy.fnt"
	
will edit just one copy of the kiddy font.  If the files do not exist,
fontedit will complain about it, but will start up anyway, allowing you 
to create new fonts.  For each font loaded up, fontedit will display an
8x16 grid, showing the current character being edited, and a table, showing
the first 128 ASCII characters.  (Note: This feature is buggy-- does anyone
know how to display characters 0-31 and 128-255 in curses?)


	Program Keys:
	
	Cursor keys:	Move the cursor around; it wraps around from
			edge to edge.
	Tab:	     	Switch between the grid and table, and from
			one font to the other.  An arrow (==>)
			points to which area is currently active.
	Space:		In the pixel grid, the space bar toggles the
			pixel under the cursor.  In the table of characters,
			it has no effect.
	0-2		Equivalent to typing "usefont N"; switches to the
			appropriate font.  0 is always the system font you
			started with, so just typing "0" will restore the
			screen to sanity if your font gets mangled. 
			
           (Note: Fontedit is case-insensitive; "c" and "C" are the same)
	   
	C		Copy the current character into the save buffer
	Y		Yank the contents of the save buffer onto
			the current character

	S		Save the current font (the font which is
			currently being edited) to the file it was
			loaded from.  There is at present no way to
			save it to a different filename.  Fontedit will create
			a backup by adding '~' to the filename; thus, 
			'kiddy.fnt~' will be the backup file.
			
	L		Reload the current font from disk (in case you've
			done something you didn't intend, and can't undo it) 

	U		Whenever you move the cursor onto a character,
			the character is saved in an undo buffer.
			This key restores the contents of that buffer,
			wiping out any changes you have made since first 
			moving onto that character.

	W		Must be followed by a "1" or a "2".  This
			will write the current font to codepage N.
			Thus, typing "W2" and then "2" will allow you
			to see what the font you're currently editing
			looks like.

	Q		Exits the program.  It will _not_ remind you
			to save your work.
			
	
	This is an alpha version.  I think it's stable enough to
handle anything you can ask it to do, but there isn't much error
checking, and there aren't very many features; of course, you don't
really need that many to create useful new fonts.  Please mail bug
reports, comments, suggestions for new features, etc. to me at 
fnord@binkley.cs.mcgill.ca.  Thanks!



	Planned enhancements are:
	
* Better error checking on save/load.

* Save to a different filename, and a reminder to save before exiting

* A help screen.

* Get it to display all the 256 characters.  Can someone tell me
  how to make curses display them?

* Font editors running under MS-DOS in text mode let you see what the font
  looks like while you edit it, by using a feature of the VGA hardware: a
  mode where characters displayed in high intensity use one font table,
  while normal characters use another.  Is this possible in Linux, especially
  in the SVGA modes?  Fontedit desperately needs a better way to see what
  your changes look like then typing "W11" or "W22" all the time.  Anyone
  have a good solution?
  
* Any other suggestions for improvements are most welcome.  Would '*' be
  better than '#' for the pixel display?  Would you like a synonym for
  one of the commands?  Is there another feature, command, or option
  that would be convenient?   
  
* Also, did this README help?  What did I leave out of it? 


  	Another future project (once I have an evening or two to kill) is a
font for NetHack.  I'd be interested to know if you come up with an 
interesting application for text fonts under Linux.  

	Thanks!
	
	
	Andrew Kuchling
	fnord@binkley.cs.mcgill.ca
	
