home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / printer / djfont.lha / DJFont.doc < prev    next >
Text File  |  1989-06-06  |  8KB  |  201 lines

  1. DJFont -- a Laserjet to Deskjet Soft Font Converter
  2. Version 0.3 for the Amiga -- June 3, 1989
  3. Copyright 1989 Charles Tyson.  All rights reserved.
  4.  
  5. P-link:  C-M-T
  6. Genie:   C.Tyson
  7.  
  8.  
  9. *** NOTES TO VERSION 0.3 ***
  10.  
  11. This program was written and compiled with Hisoft Basic 1.03.  It runs
  12. from either the Workbench (click on the icon) or a CLI (type DJFont).
  13.  
  14. DJFont has three functions:  it converts fonts, prints samples of
  15. converted fonts, and prints a table of character widths for use in
  16. constructing printer drivers for word processors.
  17.  
  18. Functions must be marked with the up and down arrow keys, and selected
  19. with the Return or Enter key.
  20.  
  21.  
  22. Converting fonts:
  23.  
  24. To minimize disk access, you should put the Laserjet soft font into RAM:
  25. before starting the program, and specify that the Deskjet soft font be
  26. written into RAM:.  DJFont uses a temporary file called T:Tallfont.tmp
  27. while it is doing a conversion.  You should assign T: to RAM:.
  28.  
  29. The program first asks for the name of the Laserjet font file to be
  30. converted (just press Return if you want to get back to the main menu). 
  31. If the file doesn't exist, it asks again.  DJFont then tests the file
  32. for convertability--if the file doesn't look like a soft font or is too
  33. large for the Deskjet (a 24 point font is about the biggest possible),
  34. the program aborts.
  35.  
  36. A properly-written Laserjet font has a 16-character description field. 
  37. If this field has garbage in it (because the Laserjet font header was
  38. poorly written or is in an old format), you will be asked for a
  39. replacement description.
  40.  
  41. DJFont then asks for the name of the Deskjet font file to be created. 
  42. If the file already exists, you will be prompted for another name.
  43.  
  44. DJFont does all the rest.  It displays the number of characters yet to
  45. be converted so you can gauge the amount of time it will need to finish.
  46. If the conversion process bombs, DJFont saves the partially-written
  47. Deskjet file so you can try to determine what went wrong.
  48.  
  49. Version 0.3 of DJFont knows how to set underlining information in the
  50. Deskjet font, and adjusts the bolding information based on the point
  51. size of the font.  DJFont is designed to work only with proportional
  52. fonts, and may mangle fixed-space fonts.
  53.  
  54. DJFont 0.3 still hasn't been tested on 8-bit fonts (those with ASCII
  55. characters above 126), but the program allocates 60K of memory for
  56. itself in case it needs lots of string storage.
  57.  
  58. Don't forget to copy your converted fonts from RAM: onto a disk before
  59. you shut off your computer!
  60.  
  61.  
  62. Printing a sample:
  63.  
  64. This function downloads an already-converted font to the Deskjet and
  65. prints out a sample for your consideration.  The only information you
  66. need to supply is the name of the Deskjet font.
  67.  
  68. This function wipes out any temporary fonts you have downloaded to your
  69. Deskjet and resets the printer afterwards, so don't use it in the middle
  70. of another printing job.
  71.  
  72.  
  73. Printing character widths:
  74.  
  75. This function prints out the character widths (in 300ths of an inch) of
  76. a converted font.  Characters which aren't defined or have 0 width are
  77. shown as "--".
  78.  
  79. This information can be used to make printer drivers for word processors
  80. such as Wordperfect, which adjust the spacing of words letter by letter.
  81.  
  82.  
  83. *** USING CONVERTED FONTS ***
  84.  
  85. Having converted a font, you'll no doubt want to download it to the
  86. printer to see what it looks like.  Here is a sketchy outline of the
  87. steps to be taken, using CLI commands.  
  88.  
  89. Note that the ECHO commands use the sequence "*E" which stands for the
  90. ESCAPE character (CHR$(27) in Basic), and often end with the NOLINE
  91. parameter so that unwanted linefeeds won't be sent to the printer. 
  92. Also, note that the ECHO sequence "**" only sends ONE asterisk to the
  93. printer, not two!
  94.  
  95. Note for ARP users only:  You may have changed the "CLI escape character"
  96. to something other than an asterisk to avoid conflicts with ARP's
  97. wildcards (see page 3 of the ARP 1.3 Overview).  If so, replace the double
  98. asterisks in the ECHO lines below with single asterisks, and replace the
  99. asterisk in "*E" sequences with your escape character.  
  100.  
  101. The ECHO commands which send Deskjet printer sequences are redirected to
  102. >PAR: instead of >PRT: because
  103.    1) PRT: intercepts the escape sequences and tries to convert them to
  104.       Amiga-specific printer commands, and
  105.    2) PRT: sends a form feed after ECHO commands, wasting paper. 
  106.  
  107. When you send actual text to the printer, you'll want to use PRT:
  108. because ECHO won't send carriage returns to the Deskjet.  The Deskjet
  109. won't return to the left margin until it sees a carriage return, which
  110. PRT: supplies.
  111.  
  112. When quotes are used in the examples below, you must use upper and lower
  113. case as shown.
  114.  
  115. 1.    Before downloading any fonts, it is a good idea to print something--
  116. anything--using PRT:.  If you first use PRT: after downloading fonts, the
  117. initialization routines of the printer device may wipe out the fonts.
  118.  
  119.     ECHO >PRT: "Okay, load them fonts now!"
  120.  
  121. 2.  Now you must tell the Deskjet to expect a font.  The command for
  122. this is
  123.  
  124.     ECHO >PAR: "*E**cNNNNND" NOLINE
  125.  
  126. where NNNNN is the ASCII representation of a number between 0 and 32767.
  127. This number, the "font number," is arbitrary--just don't download two
  128. fonts with the same number.  For example, to prepare the Deskjet to
  129. receive font number 100, you would
  130.  
  131.     ECHO >PAR: "*E**c100D" NOLINE
  132.  
  133. 3.    Tell the Deskjet whether the font is to be "temporary" or "permanent."
  134. The only difference between the two is that temporary fonts are more
  135. vulnerable to being erased by printer resets than permanent fonts.  Unless
  136. you have special requirements, make the font permanent.
  137.  
  138. The permanent command is
  139.  
  140.     ECHO >PAR: "*E**c5F" NOLINE
  141.  
  142. The temporary command is 
  143.  
  144.     ECHO >PAR: "*E**c4F" NOLINE
  145.  
  146. 4.  Next, copy the font file to the printer.  The command for this is
  147.  
  148.     COPY fontfilename TO PAR:
  149.  
  150. where fontfilename is, need I say it, the name of the soft font file.
  151.  
  152. 5.    To save you the trouble of typing three lines and counting
  153. asterisks, I have written a program called DOWNLOAD that performs the
  154. above steps.  See its separate documentation for details on using it.
  155.  
  156. 6.    To see if the font was downloaded properly, you can press the
  157. Deskjet's FONT and RESET buttons simultaneously.  This causes the printer
  158. to print out the full character set of every font in its memory. However,
  159. it also wastes a sheet of paper, so you may want to go directly to the
  160. next step.
  161.  
  162. 7.    "Tall fonts" on the Deskjet are printed in two passes.  Any font over
  163. 11 points in size is likely to be a tall font.  If the Deskjet prints a
  164. tall font bidirectionally (which is its default setting), there will be a
  165. "jaggie" where the two halves of the character meet.  To prevent this,
  166. tell the Deskjet to print in one direction only:
  167.  
  168.     ECHO >PAR: "*E&k0W" NOLINE
  169.  
  170. 8.    You can make any downloaded font the Deskjet's default font if you
  171. know the font number assigned to the font (see step 1 above).  The
  172. command is
  173.  
  174.     ECHO >PAR: "*E(NNNNNX" NOLINE
  175.  
  176. where NNNNN is the font number.  For example, to make font number 100
  177. the default font, 
  178.  
  179.     ECHO >PAR: "*E(100X" NOLINE
  180.  
  181. 9.    If everything has gone well, your downloaded font will be used until
  182. the printer is reset or until you select another font (via the panel
  183. controls or by another "default font" command).
  184.  
  185.     ECHO >PRT: "The quick brown fox jumped over the lazy dog, ha ha ha!"
  186.  
  187.  
  188. *** USING CONVERTED FONTS -- THE ADVENTURE CONTINUES ***
  189.  
  190. To make downloaded fonts really useful, you need to be able to use them
  191. within your word processing program.  Wordperfect can space downloaded
  192. fonts properly if you go through the tedious process of entering the
  193. character widths and font selection codes via the Printdef utility. 
  194.  
  195. Since the Wordperfect driver must be tailored to the specific fonts you
  196. are using, I can't give any general advice.  I have written and tested
  197. Wordperfect drivers for versions 4.1 (Amiga) and 5.0 (IBM), so I can state
  198. that it is possible.  If you want to follow in my footsteps but are having
  199. trouble with the details, send E-mail to me and I'll try to help.
  200.  
  201.