home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / LASER / FS.ZIP / FS.DOC next >
Encoding:
Text File  |  1990-09-02  |  3.8 KB  |  99 lines

  1.                             FONT SQUEEZE
  2.  
  3.                                 by
  4.  
  5.                             S. Ostrander
  6.  
  7.  
  8.  
  9. INTRODUCTION:  FS (Font Squeeze) is a program that will compress
  10. downloadable soft font files for the Hewlett Packard LaserJet III
  11. printers.  FS works best on large non-Italic font files.  However it
  12. will work on any size font file, and FS checks to make sure that the
  13. compressed characters are not larger than the original.  There are two
  14. advantages to squeezing font files.  First, they take less room on your
  15. hard disk.  Second, less time is needed to download them to the printer.
  16. FS is copyright 1990 by S. Ostrander.  FS can be used by anyone but may
  17. not be sold.  If you like FS, please distribute it as far and wide as
  18. possible.  The compr essed font files have been tested on the HP LJ II
  19. and HP LJ III.  They do not work on the II but do work on the III.  At
  20. this time, I don't know if the IIp or IId can handle compressed font
  21. files.  Finally, the user assumes all risks from using this software.
  22.  
  23. USAGE:  FS [/c | /e] [/d] fontname
  24.     /c means to compress fontname
  25.     /e means to expand fontname
  26.     /d means to print debug info while compressing or expanding.
  27.     either /c or /e can be specified but not both.  FS defaults to /c.
  28.  
  29. GENERAL INFORMATION:  1.  FS is very picky about what files it will
  30. process.  if you get an unknown command error message, that means that
  31. the font file probably had some additional printer commands embedded in
  32. it.  (see technical reference).  2.  At this time FS can't handle
  33. continuation blocks.  A continuation block is needed whenever a
  34. character needs more than 32767 bytes to represent it.  3.  FS uses a
  35. temporary file while processing the softfont.  When FS is done, it
  36. deletes the softfont file and rena mes the temporary file so that it has
  37. the same name as the original softfont file.  Therefore if the original
  38. file is locked, it will not be deleted and FS will complain.
  39.  
  40. TECHNICAL REFERENCE:
  41.  
  42. 1.  A softfont file contains a series of commands to the LJ III printer.
  43. These commands include FONT DESCRIPTOR, CHARACTER CODE, DOWNLOAD
  44. CHARACTER, ASSIGN FONT ID, ...
  45.  
  46. 2.  FS handles only the first three commands and will complain if any
  47.     other commands are present.  FONT DESCRIPTOR tells the printer about
  48.     various characteristics of the font.  CHARACTER CODE lets the
  49.     printer know what character is going to be processed next.  DOWNLOAD
  50.     CHARACTER lets the printer know wether the character is compressed
  51.     or not and how long (in bytes) the character is.  The typical format
  52.     of a softfont file is:
  53.  
  54.     FONT DESCRIPTOR
  55.  
  56.     CHARACTER CODE 1
  57.     DOWNLOAD CHARACTER
  58.         character data
  59.            . 
  60.            .
  61.            .
  62.     CHARACTER CODE x
  63.     DOWNLOAD CHARACTER
  64.         character data
  65.  
  66. 3.  If any of the character data blocks is longer than 32767 bytes a
  67. continuation block can be used.  However, FS doesn't handle them.
  68.  
  69.  
  70. 4.  Uncompressed characters are a bitmap of the character shape.  If the
  71. character width does not exactly fit into some number of bytes, it is
  72. padded with extra blanks.  For example the ! might be:
  73.  
  74.         ...XXX...
  75.         ...XXX...
  76.         ...XXX...
  77.         ...XXX...
  78.         ...XXX...
  79.         .........
  80.         .........
  81.         ...XXX...
  82.         ...XXX...
  83.         char wdth   
  84.         byte   boundary^  
  85.  
  86. where . is a white space and X is a dot.  It takes up 18 bytes.  Two
  87. bytes per row.
  88.  
  89. 5.  Compressed characters are of the form:
  90.     repeat cnt, #white, #black, #white, ...
  91.     .
  92.     .
  93.     .
  94. where repeat cnt is one less than the number of times to repeat.
  95. The above ! when compressed would be 4 3 3 3 
  96.                                      0 9
  97.                                      1 3 3 3
  98. it takes 10 bytes.
  99.