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