

                            FontLoader Width Tables


FontLoader can create a width table when the "-WT" option is specified.  The 
width table is an ASCII file.  Each line contains information about the font.  

Most application programs have their own format for creating printer drivers 
and or width tables.  By creating an ASCII file,  a program can be easily 
created to read this file and create a new file in the application programs 
format.  

Presently,  only one program has been written to read FontLoader's width table 
and create a new file for an application program.  This program is 
"WT2SPL.EXE".  It is for Sprint.  It reads FontLoader's width table and 
creates a file in Sprint's programing language.  The source code is provided.

Most major application programs have programs available to add support for 
any soft font.  I suggest looking for these programs first.  If you can't find 
one of these programs for your application program,  then you can write it 
yourself.  The program I used to write FontLoader's documentation,  Sprint,  
does not have an automated method for adding a soft font.  This prompted me to 
create "WT2SPL.EXE".  It does the majority of the work for me.  

The source code to "WT2SPL.PAS" is written in Turbo Pascal 5.0 (no objects).  
This language has been chosen because,  in my opinion,  it it the easiest to 
understand for those who don't know the language.  For example:  C programers 
should be able to make sense of it whereas those who don't know C would be 
bewildered by C.  

If you plan on writing a program ike "WT2SPL.EXE",  I suggest modifying the 
source code "WT2SPL.PAS".  If you get it running and wish to donate it to 
others,  please send me a copy and I will include it with FontLoader.



The following is an explanation of each of the first fourteen lines in a 
FontLoader width table:

Line
----
 1  Orientation  ( "0" if portrait.  "1" if landscape.                        )
 2  Symbol_Set   ( A number.  Must be computed to find the single digit plus  )
                 ( single letter format that is used in escape codes.         )
                 ( Formula:  digit  = (Symbol_Set and 224) div 32             )
                 (           letter = char((Symbol_Set and 31) + 64)          )
 3  Spacing      ( "0" if fixed spacing.  "1" if proportional.                )
 4  Pitch        ( Number of quarter dots per character.                      )
                 ( Formula:  chars/inch = 300 / (Pitch / 4)                   )
 5  Height       ( Height in quarter dots.                                    )
                 ( Formula:  point size = (72 / 300) * (Height / 4)           )
 6  Style        ( "0" if upright.  "1" if italic.                            )
 7  Weight       ( Ultra Thin "-7" to Ultra Black "7".                        )
 8  Typeface     (                                                            )
 9  Font_Type    ( "0" if only ASCII codes 32 to 127 are printable.           )
                 ( "1" if ASCII codes 32 to 127 and 160 to 255 are printable. )
                 ( "2" if all except 0, 7, 15, and 27 are printable.          )
10  Baseline     ( Distance in dots from the top of the character cell to the )
                 ( baseline.                                                  )
11  Cell_Width   ( In dots.                                                   )
12  Cell_Height  ( In dots.                                                   )
13  XHeight      ( In quarter dots.                                           )
14  Font_Name    ( An optional string usually containing the font name.       )

15  This line,  line fifteen,  is text indicating that character information 
    follows.  Ignore this line.  

The rest of the lines are character information lines.  There is one line for 
each character defined in the font file.  Each line has six numbers,  text 
strings,  right justified in ten spaces.  Following is a list of the items 
respectively: 

Char_Num         ( The ASCII number of the character being defined.           )
Deltax           ( In quarter dots.                                           )
Char_Width       ( In dots.                                                   )
Char_Height      ( In dots.                                                   )
Left_Offset      ( In dots.  May be negative.                                 )
Top_Offset       ( In dots.  May be negative.                                 )

Most applications printer drivers and width tables use only the Deltax value 
for the character width.  Undefined characters are usually given the Pitch to 
substitue for Deltax.  This is how the space character is normaly defined.    
Both Deltax and Pitch are usually divided by 4 to obtain dots from quarter 
dots.  

I suggest creating a width table and looking at the results.  

Remember: Pitch, Height, XHeight, and Deltax are all in quarter dots. Divide 
          by four to obtain the value in dots.
 
 

