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 / misc / fprint.lzh / FPRINT.DOC next >
Text File  |  1985-02-17  |  15KB  |  349 lines

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