home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / rainbow / msdos / latrobe / f / fancyexe.arc / FPRINT.DOC < prev    next >
Text File  |  1985-10-11  |  17KB  |  389 lines

  1.  
  2.               FPRINT Font Printer
  3.  
  4.                  Version 2.02
  5.                J Anthony Movshon
  6.                February 23, 1985
  7.  
  8.  
  9.    FPRINT formats text for output to an LA50 or LA100 with the    extended
  10. logic option.  The input text can come either from a file or be typed in
  11. by hand.  FPRINT uses fonts generated by the FEDIT program, and  outputs
  12. the  graphic  sequences to draw those characters on the printer.  FPRINT
  13. also knows how to do text justification,  centering,  paging  and  other
  14. document-formatting  operations.    FPRINT is based on a CP/M program of
  15. the same name by A. Christopher Hall;  the present version  is    for  MS-
  16. DOS, version 2 or later.
  17.  
  18.  
  19. RUNNING FPRINT
  20.  
  21.    There are several ways to run fprint; the general syntax is
  22.  
  23.     fprint [ -p ] [ -o outfile ] [ infile ]
  24.  
  25. Simplest is to invoke the program by typing "fprint".  You  will  get  a
  26. ">"  prompt.    The  first thing you must do is read in one or more font
  27. files (described with the directives below).  Then you can type lines of
  28. text or issue directives to change the formatting, control the printing,
  29. or include text from a file.  When you are done, type a line  containing
  30. only  a  single ".".  FPRINT will ask if you want the output sent to the
  31. printer immediately; answer "Y" or "N".  In either case, the output will
  32. be  in the default file FPRINT.TXT, which can subsequently be printed in
  33. the usual way.    It takes quite a  while  to  print  the  file  --  every
  34. character of your text needs 20 to 100 ASCII characters to draw it -- so
  35. some kind of print spooler is an advantage, as is running  your  printer
  36. at the highest permissible BAUD rate.
  37.  
  38.    If you specify an input file on the command    line,  FPRINT  will  not
  39. prompt    for  keyboard  input  but  will immediately read and process the
  40. file, diplaying the input text as it proceeds.    When done,  FPRINT  will
  41. immediately  ask if you want the file printed.    Note that the input file
  42. must contain the directive to read the    font  file  (as  well  as  other
  43. directives),  since  you  don't get a chance to type that information in
  44. yourself.
  45.  
  46.      The  command  line  options  "-p"    and  "-o  outfile"  control  the
  47. destination of FPRINT's output.  If you use the -p flag, FPRINT will not
  48. create an output file but  will  print    the  formatted    text  as  it  is
  49. processed.  This option is useful when disk space is at a premium, since
  50. FPRINT's output files can run to tens of thousands  of    bytes  even  for
  51. rather    short  documents.   The disadvantage of this method is that when
  52. you are typing input from the keyboard, you  must  wait  for  FPRINT  to
  53. process  and  print  each  line  before  proceeding;  if your printer is
  54. running at less than 4800 BAUD, this can become tedious.   The    -o  flag
  55. allows    you  to  direct FPRINT's output to another file than the default
  56. "fprint.txt".
  57.  
  58.  
  59. FONTS
  60.  
  61.    A number of fonts are supplied with the FPRINT/FEDIT package.    They
  62. come  in  three  sizes:    12,    18, and 24 printer-dots ("points") high.
  63. FPRINT's points (1/72 inch) are actually a little smaller  than  a  true
  64. point.     The supplied fonts are described below.  It's easy to make more
  65. (especially if you can hack one of these fonts) using  the  font  editor
  66. FEDIT.    You can make larger or smaller fonts, as long as the height is a
  67. multiple of 6.    However, 6 points  is  pretty  tiny,  and  FEDIT  cannot
  68. presently edit a font larger than 24 points.  By convention, the name of
  69. the font file is the font style followed by one of the    sizes,    such  as
  70. ASCII12 or GOTHB24.  The font file type is .FNT.
  71.  
  72.     Font    Size(s)  Description
  73.  
  74.         ASCII   12       Plain characters (too small to be fancy)
  75.     ROMAN    18, 24     Serifs. Book-like type.
  76.     ITALIC    18, 24     Serifs and slanted forward.
  77.     GOTH    18, 24     Gothic: Sans-serif. Block characters.
  78.     GOTHB    18, 24     Gothic Bold: Sans-serif; thicker than GOTH.
  79.     COPR    18, 24     Copperplate Gothic. Very small serifs.
  80.     CIRCUS    24     Gothic, thick at top and bottom; like a circus
  81.                 sign or an old western wanted poster.
  82.     OLDENG    18     Old English Gothic lettering.
  83.     FEANOR    12, 18     Middle-Earth Elvenscript from "The Lord of the 
  84.                 Rings".
  85.     PUNC    18, 24     Incomplete plain punctuation and number font.
  86.  
  87. While you could (with difficulty) construct a "monospaced" font in which
  88. all characters had the same width, the supplied fonts are proportionally
  89. spaced.  This means that the only way to ensure that material printed on
  90. different  lines  will    line up correctly is to use tabs to position the
  91. carriage; using the conventional method based on character  counts  will
  92. not work.
  93.  
  94.  
  95. DIRECTIVES
  96.  
  97.    Directives tell FPRINT to read  font  files    or  text  files,  change
  98. fonts,    set  formatting  parameters  like line and character spacing, or
  99. tabs, and change formatting techniques like justification and centering.
  100. All  directives  begin    with  "." and must be preceded and followed by a
  101. space or a CRLF.  In order to prevent a word beginning with a  "."  from
  102. being  interpreted  as a directive, it must be prefixed with the literal
  103. escape character "\".  Most directives can appear anywhere  between  two
  104. words on the line, mingled with text or other directives.
  105.  
  106.    In the descriptions below, "n" means a decimal number and  "c"  is  a
  107. character.    These  and  filename  arguments  must follow the directive
  108. without intervening white space.  Three types of spacing measure are
  109. used by the various directives:
  110.  
  111.  o A "space" is a character from some font.  It's used, for example,  to
  112.    separate words or to set paragraph indentations.
  113.  
  114.  o A "microspace" is the room occupied by a single dot typed by one wire
  115.    of  the printer; there are 144 microspaces to the hiorozontal inch of
  116.    print.
  117.  
  118.  o A "line" is the height of a single graphic  line,  which  contains  6
  119.    rows  of print dots.  There are 12 graphic lines to the vertical inch
  120.    of print.
  121.  
  122. Directives which are in effect at startup are marked "Default".
  123.  
  124. .An   
  125.       Make font n (1 <= n <= 5) current:  text will be output using that
  126.       font  until  another  .A    directive is encountered.  See also .Fn.
  127.       Making a font current changes the values    of  character  and  line
  128.       spacing to the defaults or modified values for that font.
  129.  
  130. .B    
  131.       Output a blank line when a  blank  line  is  typed.    This  seems
  132.       obvious, but see .NB.  Default.
  133.  
  134. .C    
  135.       Center the next line within the current width, not considering any
  136.       left margin that may be specified.  .C works for only one line, so
  137.       you have to type ".C" before every line you want centered.
  138.  
  139. .Fnname
  140.       Read the font file "name.fnt" into font n.  Some font must be read
  141.       in  before  any  text  is  processed.    FPRINT  can  hold up to 5
  142.       different fonts at a time.  You may read fonts at  any  time;  the
  143.       old  font  n,  if  there    is one, will be replaced by the new one.
  144.       Note that reading a font does not make  it  current;  the  current
  145.       font is specified with the .An and .NA commands.
  146.  
  147. .JHc  
  148.       Set the Justify Header Character to "c".  If  you  are  justifying
  149.       (either  fill  or  no-fill)  and have a non-zero left margin, then
  150.       when FPRINT wants to output a new paragraph it will put "c" at the
  151.       margin  of  the  first  line.    This  would  be  used to indent a
  152.       paragraph and start it with a "bullet".  If "c" is the letter  "N"
  153.       then  the paragraphs will be numbered consecutively, starting with
  154.       1.  The  number  and  a  period  will  be  output  at  the  margin
  155.       (Restriction:  FPRINT only understands single digits now, so don't
  156.       use this with more than 9 paragraphs).  To cancel the Header,  use
  157.       .NH.
  158.  
  159. .JU   
  160.       Justify within the given width and left margin.  The right  margin
  161.       is  left ragged.    Type a blank line to end a paragraph.  .NJ stops
  162.       the justifying.  See  also  paragraph  indent  (.Pn),  blank  line
  163.       outputting  (.B  and  .NB),  left margin (.Mn), and Justify Header
  164.       (.JHc). [This notation is confusing: what is meant by "justify" is
  165.       in fact "fill but do not justify", like .F;.NJ in RUNOFF].
  166.  
  167. .JF   
  168.       Justify filled within the given width.  Same  as  .JU  except  the
  169.       right margin is made straight.
  170.  
  171. .Ln   
  172.       Set the number of blank lines output after a  line  of  text.    A
  173.       blank line is six micro-dots high (so in general it's much smaller
  174.       than the height of the text).  The default value is  carried  with
  175.       each font, and varies.  The usual value is 1.  0 is illegal.  Once
  176.       set by .L, the default value for the current font is  changed,  so
  177.       if it is later reselected, the value set by .L is restored.
  178.  
  179. .Mn   
  180.       Set the left margin for justified  text.      N  is  the  number  of
  181.       microspaces  which  precedes  each  line.  Default:  0.  Note that
  182.       previous versions of FPRINT set this margin not in microspaces but
  183.       in spaces of the current font. The default value is 144 (1 in).
  184.  
  185. .NA   
  186.       Set no alternate font.  This is the same as .F1.
  187.  
  188. .NB   
  189.       When justifying, suppress the output of a blank line when a  blank
  190.       line  is  typed.  A blank line ends the current paragraph, however
  191.       it's not always desirable to have the blank  line  appear  in  the
  192.       output.
  193.  
  194. .NH   
  195.       Clear the Justify Header Character.  See .JHc.
  196.  
  197. .NJ   
  198.       Stop justifying.  Text will be output line by line as it is  typed
  199.       in.  Default.
  200.  
  201. .NTS  
  202.       Clear all tab settings.  See .NTn, .TSn, .TN and .TB.  Default.
  203.  
  204. .NTn  
  205.       Clear the tab which has been set at microspace position  n.    See
  206.       .NTS, .TSn, .TN and .TB.
  207.  
  208. .Pn   
  209.       Set paragraph indent for justify.  N is the number  of  spaces  to
  210.       indent.
  211.       
  212. .PG
  213.       Force a page break and continue output on a new page.
  214.  
  215. .PLn
  216.       Set the length of the print area of  the    page  to  be  n  graphic
  217.       lines in length. The default is 108 (9 in).
  218.  
  219. .PMn
  220.       Set the top margin (the number of blank graphic lines at    the  top
  221.       of each new page) to n. The default value is 9 (3/4 in).
  222.  
  223. .PTn
  224.       Test that at least n graphic lines remain on the current page;  if
  225.       not, force a page break and continue output on a new page.
  226.  
  227. .Rfile.nam
  228.       Read the file "file.nam" and process directives and text from  it;
  229.       then return for user input.
  230.  
  231. .Sn   
  232.       Set the letter spacing.  This is the number of microspaces  output
  233.       between  characters.    A  wider    value  gives  "extended" text; a
  234.       narrower one makes the text look "condensed".  The  default  value
  235.       is carried with each font, and varies.  This directive changes the
  236.       default value for the current font only:    changing  fonts  selects
  237.       the default or altered value for the new font.
  238.  
  239. .TB   
  240.       Move to the next tab setting.  This will also be    done  if  a  tab
  241.       character  (control-I,  octal  11)  is found in the text.  The tab
  242.       settings must previously have been set up using .TI, .TN    or  .TSn
  243.       commands.    Tabs  encountered when no tab-stops have been set are
  244.       treated as spaces.
  245.  
  246. .TIn
  247.       Set tabstops  from  the  present    left  margin  at  the  increment
  248.       specified (in microspaces) by n.
  249.  
  250. .TN
  251.       Set "normal" tabstops,  every  72  microspaces  (i.e.  every  half
  252.       inch), up to 1440 (10 inches).
  253.  
  254. .TSn  
  255.       Set a tab at the microspace position n.  Note  that  tab    settings
  256.       are made with reference to the present left margin (set with .M).
  257.  
  258. .Wn
  259.       Set line width to be n microspaces, 144 microspaces to  the  inch.
  260.       A  value    of  1152  fills  an  8    inch print line completely.  The
  261.       maximum value of n is 2260, corresponding to a 15 inch line.   The
  262.       value specified by .W includes and is not added to the left margin
  263.       value specified with .M; thus changes in    .M  do    not  change  the
  264.       right  margin.    The default value is 1008, giving a 7-inch print
  265.       line, of which the first inch is blank margin.
  266.  
  267.       
  268. LITERAL ESCAPES
  269.  
  270.     In order to prevent a word beginning with "." from being interpreted
  271. as  a directive, you must prefix the "." with a "\"m which functions (in
  272. the Unix style) as a literal escape character.    In order to print a "\",
  273. you must enter "\\".
  274.  
  275.  
  276. PAGE MARGINS
  277.  
  278.     The  following  diagram  shows  FPRINT's  default  margins    and  the
  279. directives used to change them.
  280.  
  281.     ---------------------------------------------------------
  282.     |                ^                |
  283.     |                |      Default is 3/4"    |
  284.     |               Top Margin            |
  285.     |                |      Set with .PM        |
  286.     |                v                |
  287.     |                ^                |
  288.     |                |                |
  289.     |  Left             |                |
  290.     |<------>            |      Default is 9"     |
  291.     | Margin           Page Length            |
  292.     | Default is 1"         |      Set with .PL        |
  293.     | Set with .M            .                |
  294.         |                                                       |
  295.         |                         Line                          |
  296.     |<------------------------------------------------>    |
  297.     |              Width             |
  298.     |           Default is 7", set with .W        |
  299.         |                                                       |
  300.     |                .                |
  301.     |                |                |
  302.     |                v                |
  303.     |                            |
  304.     |                            |
  305.     ---------------------------------------------------------
  306.  
  307. Although the nominal left and right margins are 1 and 1 1/2 in on 8  1/2
  308. by  11 in paper, on 9 1/2 by 11 in fanfold paper in an LA50, they become
  309. symmetrical and roughly 1 1/4 in.  Similarly, the asymmetry between  the
  310. top  (3/4  in)    and bottom (1 1/4 in) margin is usually rectified by the
  311. fact that the top of the page is a little higher than the printhead when
  312. paper is loaded.
  313.  
  314. SYSTEM REQUIREMENTS
  315.  
  316.    FPRINT will run on a DEC Rainbow or    other  MSDOS  personal    computer
  317. with  minimal ANSI screen support; it requires a DEC LA34, LA50 or LA100
  318. printer with graphics option.  The companion font editor FEDIT    requires
  319. a VT100 or compatible screen and is configured for the Rainbow keyboard.
  320. The source code should be reasonably easily ported  to    other  kinds  of
  321. computer  (the    original  version  was written in BDS C for CP/M-80; the
  322. present version is in Microsoft/Lattice C).
  323.  
  324.    In a minimal MSDOS 2.05 or 2.11 system with    128  kbytes  of  memory,
  325. FPRINT    has  enough  free  memory to accommodate any five fonts.  If the
  326. amount of free memory (revealed by CHKDSK) is for  some  reason  smaller
  327. than  about  70000  bytes, it may be impossible to accommodate all fonts
  328. simultaneously and a ".f" directive will elicit an error message  saying
  329. there  is  no more room for another font.  When that happens, everything
  330. is O.K., except that the latest font has not been read.  If  you  really
  331. want  that  font,  you    have  to  get  rid of one of the other fonts (by
  332. reading the new font over it).
  333.  
  334.  
  335. BUGS AND LIMITATIONS
  336.  
  337.    The paging routine does not presently number pages.      This    will  be
  338. fixed in version 2.1.
  339.  
  340.    Multiple pages  cannot  presently  be  printed  easily  using  single
  341. sheets,  since    no  mechanism exists to pause to allow a new sheet to be
  342. loaded.  This will be fixed in version 2.1.  It would be relatively easy
  343. to write a program to print FPRINT files in this controlled manner.
  344.  
  345.    The last page break of a file leaves the paper positioned  improperly
  346. for the beginning of the next file.
  347.  
  348.    Justification does not always complete properly if a blank line  does
  349. not precede or follow the .NJ command.
  350.  
  351.    The Justify Header Character is always printed at the  left    edge  of
  352. the paper; it should be possible to specify this margin separately.
  353.  
  354.    If your  printer  auto-wraps,  printing  lines  that  go  beyond  the
  355. printer's right margin creates an irretrievable mess on the page.
  356.  
  357.    While many serious bugs have  been  removed    from  the  justification
  358. routines,  these  are sufficiently convoluted that is perfectly possible
  359. that some remain.  For example, words too long to  fit    on  a  justified
  360. line are not properly handled and cause the program to crash.
  361.  
  362.    FPRINT attempts be sensible about accepting strange parameter values
  363. from directives, but it is probably possible to demolish the program by
  364. feeding it enough weird numbers.
  365.  
  366.    Characters beyond the 80th column of  an  input  file  are  discarded
  367. without warning.
  368.  
  369.    No error checking is done to ensure that the  specified  output  file
  370. can  in  fact  accommodate  all  the  data; print files can be truncated
  371. without warning if you run out of disk space.  This problem does not, of
  372. course, occur if the -p option is used.
  373.  
  374.    Please report any bugs you may find or suggestions  for  improvements
  375. to  the  author  by  one  or more of the following routes.  I would also
  376. appreciate receiving copies of any new fonts you may create.
  377.  
  378.     J. Anthony Movshon
  379.     
  380.     US mail:    100 Bleecker Street
  381.             New York, NY 10012
  382.     
  383.     ARPAnet mail:    hipl!tony@nyu-cmcl2
  384.     
  385.     UUCP mail:    {seismo|allegra|ihnp4}!cmcl2!hipl!tony
  386.     
  387.     Or leave a message for me (as "Tony Movshon")  on  the    DEC-WARE
  388.     Fido BBS (212 535-8924).
  389.