home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8710 / 18 / README < prev    next >
Encoding:
Text File  |  1990-07-13  |  2.6 KB  |  56 lines

  1. Troff2lj is a filter that translates CAT troff output (as described
  2. in the documentation for a SUN work station) into commands for an
  3. HP LaserJet II laser printer.  The necessary fonts must be present on
  4. the printer, either as a font cartridge or as a downloaded font.
  5. (The latter has not been tested.)  One obvious improvement would be
  6. to have the filter download the fonts as necessary.  At present the
  7. program is set up to use the K font cartridge.  To use another font,
  8. you will as a minimum need to change the font width tables and
  9. probably also the character translation tables in troff2lj.c.
  10.  
  11. The files ftXX.c are the font width tables that should be compiled
  12. and placed in `/usr/lib/font/ftXX' for troff to find.  Note that because
  13. of a bug in troff, the width tables MUST be named ftR, ftI, ftB, and
  14. ftS.  If two character font names are used (like fthS) troff will not
  15. recognize the special font as being mounted and will also mess up
  16. transitions between roman, italic, and bold sets.  (This was discovered
  17. using troff supplied with a SUN work station running SUN 3.3 Unix).
  18.  
  19. Troff assumes that the character widths scale with the point size.
  20. Unfortunately this is not true for several characters on the K font
  21. (like plus, minus, etc.).  The width tables are set up for 10 point by
  22. scaling HP supplied widths by 0.864 and rounding to nearest integer.
  23. The widths in fthS.c are likely to contain errors.
  24.  
  25. The files heqn and htroff are two scripts that can be used to run
  26. eqn and troff with appropriate options and include files.  You probably
  27. want to install troff2lj as the `lpr -t' filter instead of including
  28. it in htroff as done here.
  29.  
  30. HP supplies font width tables on floppy disk for free (you supply
  31. the floppies). They are not copyrighted but they are rather large
  32. and therefore not included here. Call your local HP rep.
  33.  
  34. The awk script `awk-width' can be used to generate additional troff
  35. character width tables from the HP width tables.  Type
  36.  
  37.     awk -f HP-name > ftXX.c
  38.  
  39. The output character table, ftXX.c, must be edited for the width of
  40. a space (12).  Position 127 is used for a narrow space (6).  The
  41. characters `"', `#', `<', `>', `@', `\' `^', `_', `{', `}', and `~'
  42. do not exist on the standard font so the widths of these should be
  43. set to zero.  Finally, special characters (on the standard font) must
  44. be added below position 127.  See fthR.c.
  45.  
  46. The program has been running for a couple of months and should be
  47. reasonably bug free.  Still I should appreciate receiving bug reports
  48. as well as any improvements to the program.
  49.  
  50. Enjoy...
  51.  
  52. Sverre Froyen
  53. UUCP:   boulder!fesk!sverre, sunpeaks!seri!fesk!sverre
  54. ARPA:   froyen@nmfecc.arpa
  55. BITNET: froyen@csugold.bitnet
  56.