    
                
           
                                 
                 
                  
                            V1.0  

COPYRIGHT (C) 1995 JOSHUA FENNELL.  ALL RIGHTS RESERVED.   


        
        FontWizard is a simple font editor, for use in demos, games, or 
 whatever else you want to use it for.  It is a very simple editor, and
 not meant to be anything spectacular, but it is my first 'production', and 
 I am rather proud of it.  I started off at the beginning of December, 
 last year, with the intent of making a vector editor, but got sidetracked 
 working on this.  It is still obviously unfinished, but frankly I'm sick of 
 working on it.  I decided to release it as is, so I could continue
 with the vector editor.  Someday I hope I'll be able to flesh this out     
 into something much larger, but if I do, it won't be any time too soon.
 Anyway, I hope you can make some use of this...

 FontWizard...
 -is freeware
 -runs in 320x240 vga mode-x
 -makes fonts up to 32x32 in size
 -makes fonts up to 256 chars in length
 -makes real small files
 -has an easy file format
 -has a nice interface(least I think so :)

 Requirements:
 -------------
 -386 or higher
 -vga adapter
 -mouse
 
 It would be best to have a fairly fast processor.  It runs quite well on my 
 486SX2/50, but drags on my dad's SX/20.

 Possible problems:
 ------------------       
        -I already mentioned the speed.  If ya've got a slow PC, sorry...
        -There may be a problem with the scroll bars in the file-browsing
         window, if the program finds a whole lot(as in over 100) of files 
         or subdirectories in any given directory.  There shouldn't be a 
         problem, unless you really go nuts makin' fonts.

 Hopefully, this is it.  I doubt it, though. :( If, perchance, you DO find
 a bug, feel free to let me know.  By bug, I mean a real problem, not the 
 fact that I left out letter-rotation buttons, and stuff like that.  For
 that, you'll have to wait for another version(assuming I make one). 

 Controls:
 ---------       
        The controls are pretty self-explanitory(I hope...).  The only 
 things that might be confusing:  
        
        -The COPY button is really a SAVE AS button.  
         See, if I'd made it say SAVE AS, instead of COPY, it would have 
         run off the screen. :) 
        
        -The third box down on the left side of the screen, with
         the + and - buttons next to it, controls the length of the 
         font(number of letters).  Min is 0, max is 255.  
        
        -The box on the opposite side of the 
         screen, above PREV, is the index box.  The index of the first 
         letter in any font is 0.  
        
        -As far as the +/- control buttons go, be warned:  they 
         are a bit hyperactive.  If you want to inc/dec something by one, 
         TAP the mouse button.  The +/-, and scroll bar buttons in the file 
         browser are the only buttons that can be held down, and have their 
         action repeat.  
        
        -If you want to change drives in the file browser, type the letter 
         of the drive you want to change to, followed by a colon, a 
         backslash, and a directory (optional).  You MUST type a slash, 
         because if you just typed 'drive:', FontWizard will look for a file.  
         Hmm..this paragraph is a lot longer than I had intended for it 
         to be. :) 
        
        -One last thing:  if you're too lazy to hit the QUIT button, you can 
         just press the ESC key.  

 File format:
 ------------       
        Here it is:
        -first byte is the width
        -second byte is the height.  All letters in the font have the
         same width and height. 
        -third byte is the last letter of the font(remember: 1st is 0..)
        -the remainder of the file is the font data, set up as follows:
         
         Each horizontal line of a letter is broken up into bytes.
         The maximum width of a letter is 32, so the maximum number of bytes
         on any given line is 4.  As you scan through a byte, if a bit is
         on(1), then that pixel is on.  This is kind of hard to explain, so
         I'll draw a diagram.  We'll say this diagram is for a 4x4 letter:

               ͻ
         BYTE 100011000   The program will use the necessary
               ͹   number of bytes to store a line of the
         BYTE 200100100   letter.  If the letter is only 4 wide,
               ͹   FontWizard will use a whole byte to
         BYTE 301111110   store a line of the letter.  If the 
               ͹   letter is 9 wide, FontWizard will use
         BYTE 401000010   2 bytes per line.  The number of bytes 
               ͼ   saved depends upon the height of the 
                B B B B B B B B    letter.  
                I I I I I I I I
                T T T T T T T T
                1 2 3 4 5 6 7 8
         Ok..so maybe I lied about the file format being simple. 
         Just to make sure you understand how this thing works, I'll
         provide some pascal source to read a font from a file.
         By the way, this is the same routine FontWizard 
         uses to read the fonts, so it DOES work.  
*****************************************************************************
{I do it this way because the buffer holding the font is larger than
the font itself.  If you used a buffer the same size as the font(and you
would probably want to), loading a font would be much easier.}

Procedure LoadFont(name:string; var buffer:fontarray);
var fontfile:file; w, count, count2, count3:byte;
begin
     assign(fontfile, name);
     reset(fontfile, 1);
     blockread(fontfile, width, 1);
     blockread(fontfile, height, 1);
     blockread(fontfile, lastletter, 1);
     w := (width shr 3)-1;
     if (width and 7)>0 then inc(w);
     for count := 0 to lastletter do
         for count2 := 0 to height-1 do
             for count3 := 0 to w do
                 blockread(fontfile, buffer[count][count2, count3], 1);
     close(fontfile);
end;
*****************************************************************************         
         I sincerely hope that helps!  The file format probably could've     
         been optimized even more, but I'm lazy..maybe in v2.0.  Oh..one
         more thing I forgot to mention:  the files that FontWizard creates
         have the extension '.FW'. (fat woodchuck??)

 Contacting me:
 --------------       
        Like it says when the program loads, my e-mail address is:
 jafennel@eos.ncsu.edu  <--that's at North Carolina State University,
 just in case you were wondering.  If you find any major bugs(you 
 probably will), please let me know.  Also..I've wanted for some time
 to form a demo group, but my attempts to have been unsuccessful, 
 probably because of where I live.  If you're interested, by all means
 tell me.  I prefer to code in pascal, but I know a good bit of asm, 
 (graphics routines in for this prog were written with tasm. the rest with
 tp 7) and am learning c++.  I also like to draw(note:  I didn't spend a 
 great deal of time on the wizard pic in the program).  Anyway, get
 in touch with me for any of these reasons, or just to chat 'bout 
 demos, or whatever. :) 
 
 Greetings:
 ----------       
        -Denthor/Asphyxia, for the great demo tutor series
        -Too many freaking demo groups to name

 I hope this documentation was written clearly enough.  I'm off to write
 an English paper for tomorrow.  Enjoy FontWizard!

 Josh

