home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR31 / FIGLET.ZIP / FIGLET.MAN < prev    next >
Text File  |  1993-12-10  |  18KB  |  529 lines

  1.  
  2.  
  3.  
  4. FIGLET(6)                        FIGLET(6)
  5.  
  6.  
  7. NAME
  8.        figlet  -  print  in  large characters made up of ordinary
  9.        screen characters
  10.  
  11. SYNOPSIS
  12.        figlet [ -clnptvDEF ] [ -m smushmode ] [ -w outputwidth ]
  13.         [ -d fontdirectory ] [ -f fontfile ]
  14.  
  15.  
  16. DESCRIPTION
  17.        figlet prints its input using large characters made up  of
  18.        ordinary  screen  characters.   figlet output is generally
  19.        reminiscent of the sort of ``signatures'' many people like
  20.        to  put    at  the end of e-mail and UseNet messages, and is
  21.        oriented normally, not sideways as  in  many  banner  pro-
  22.        grams.
  23.  
  24.        figlet  can  print  in  a  variety of fonts, with adjacent
  25.        characters ``smushed'' together in various  ways.   figlet
  26.        fonts  are  stored in separate files, which can be identi-
  27.        fied by the suffix  ``.flf''.   figlet  Most  figlet  font
  28.        files will be stored in figlet's default font directory.
  29.  
  30.  
  31. USAGE
  32.        Just start up figlet (type ``figlet'') and then type what-
  33.        ever you want.  Alternatively, pipe a file or  the  output
  34.        of another command through figlet.  See EXAMPLES for other
  35.        things to do.
  36.  
  37.  
  38. OPTIONS
  39.        figlet reads command line options from left to right,  and
  40.        only  the  last    option    that  affects a parameter has any
  41.        effect.    Every option (except -v and -F) has  an  inverse,
  42.        so  that,  for  example, if figlet is customized with a C-
  43.        shell alias, all the options are still available.
  44.  
  45.        -c
  46.        -l     -c centers the output  horizontally.   -l  puts  it
  47.           back to left-justified (default).
  48.  
  49.        -d fontdirectory
  50.           Change  the  default  font directory.  figlet looks
  51.           for fonts first in the default directory    and  then
  52.           in  the current directory.  If the -d option is not
  53.           specified, figlet uses the directory that was spec-
  54.           ified  when  it  was  compiled.    To find out which
  55.           directory this is, use the -F option.
  56.  
  57.        -f fontfile
  58.           Select the font.    The .flf suffix may be    left  off
  59.           of  fontfile,  in  which    case figlet automatically
  60.           appends it.  figlet looks for the file first in the
  61.  
  62.  
  63.  
  64. v2.0              9 August 1993             1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. FIGLET(6)                        FIGLET(6)
  71.  
  72.  
  73.           default  font  directory    and  then  in the current
  74.           directory, or, if fontfile  was  given  as  a  full
  75.           pathname, in the given directory.
  76.  
  77.        -w outputwidth
  78.           Sets  the outputwidth to the given integer.  figlet
  79.           uses the outputwidth to  determine  when    to  break
  80.           lines  and  how  to  center  the output.    Normally,
  81.           figlet assumes 80 columns so that people with  wide
  82.           terminals won't annoy the people they e-mail figlet
  83.           output to.  -w and -t override each other.
  84.  
  85.        -m smushmode
  86.           Specifies how figlet should  ``smush''  consecutive
  87.           characters together.  This option is rarely needed,
  88.           as a figlet font file specifies the best    smushmode
  89.           to use with the font.  smushmode can be one of:
  90.  
  91.  
  92.           -2 Get mode from font file (default).
  93.              Every  figlet  font  file specifies the best
  94.              smushmode to use with the font.   This  will
  95.              be  one  of  the  following  smushmodes  (-1
  96.              through 63).
  97.  
  98.           -1 No smushing.
  99.              Characters are simply concatenated together.
  100.  
  101.              In  any non-negative smushmode figlet pushes
  102.              adjacent  font  characters  together   until
  103.              their  non-blank  portions  touch.   At that
  104.              point, it may or may not push the    two  font
  105.              characters   1   screen   character  closer,
  106.              depending on the  smushmode.   Pushing  font
  107.              characters one step closer requires ``smush-
  108.              ing'' two non-blank screen characters into a
  109.              single  screen character.    figlet has 6 ways
  110.              of doing this, represented by 1, 2, 4, 8, 16
  111.              and 32.  The various non-negative smushmodes
  112.              (0-63) are obtained by adding up the numbers
  113.              corresponding to the sort of smushing figlet
  114.              should do.
  115.  
  116.           1 Smush equal characters.
  117.              Two screen characters  are  smushed  into    a
  118.              single  character if they are the same.  The
  119.              resulting character is the same as  both  of
  120.              the original characters.  This mode does not
  121.              smush the character known    as  a  hardblank,
  122.              which is a character that prints as a blank,
  123.              but is not smushed (except in mode 32).  See
  124.              FONT  FILE  FORMAT  for  more information on
  125.              hardblanks.
  126.  
  127.  
  128.  
  129.  
  130. v2.0              9 August 1993             2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. FIGLET(6)                        FIGLET(6)
  137.  
  138.  
  139.           2 Smush underscores.
  140.              An underscore  will  be  smushed  into  (and
  141.              replaced by) any of ``|/\[]{}()<>''.
  142.  
  143.           4 Hierarchy smushing.
  144.              Smushes  certain characters together accord-
  145.              ing to a  hierarchy  containing  6  classes:
  146.              ``|'',   ``/\'',    ``[]'',  ``{}'',  ``()'',
  147.              ``<>''.   A  member  of  any  class  can  be
  148.              smushed into and replaced by a member of any
  149.              later class.
  150.  
  151.           8 Opposite pair smushing, type I.
  152.              Smushes opposing brackets    (``[]''),  braces
  153.              (``{}'')  and parentheses (``()'') together,
  154.              replacing them with a vertical bar (`|').
  155.  
  156.           16 Opposite pair smushing, type II.
  157.              Smushes opposing slashes (``/\'') and  less-
  158.              than/greater-than (``<>'') together, replac-
  159.              ing them with an upper-case `X'.
  160.  
  161.           32 Hardblank smushing.
  162.              Smushes two hardblanks  together,    replacing
  163.              them with a single hardblank.  See FONT FILE
  164.              FORMAT for more information on hardblanks.
  165.  
  166.        -p
  167.        -n     -p puts figlet into paragraph  mode,  which  elimi-
  168.           nates  some  spurious  line  breaks  when  piping a
  169.           multi-line file through figlet.  In paragraph mode,
  170.           figlet  treats line breaks within a paragraph as if
  171.           they were merely blanks between  words.    (Specifi-
  172.           cally,  -p  causes  figlet  to  convert any newline
  173.           which is not preceded by a newline and not followed
  174.           by a space character into a blank.)  -n puts figlet
  175.           back to normal (default), in  which  every  newline
  176.           figlet reads causes it to produce a line break.
  177.  
  178.        -t     Sets the outputwidth to the terminal width.  If the
  179.           terminal width is  not  known,  the  previous  out-
  180.           putwidth    is retained.  figlet uses the outputwidth
  181.           to determine when to break lines and how to  center
  182.           the output.  Normally, figlet assumes 80 columns so
  183.           that people with wide  terminals    won't  annoy  the
  184.           people  they  e-mail  figlet  output to.    -w and -t
  185.           override each other.
  186.  
  187.        -v     Prints out the version and  copyright  information,
  188.           then exits.
  189.  
  190.        -D
  191.        -E     -D  switches to the German (Deutsch) character set.
  192.           Turns `[', `\' and `]' into umlauted A,  O  and  U,
  193.  
  194.  
  195.  
  196. v2.0              9 August 1993             3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. FIGLET(6)                        FIGLET(6)
  203.  
  204.  
  205.           respectively.   `{',  `|'  and  `}'  turn  into the
  206.           respective lower case versions of these.    `~' turns
  207.           into  s-z.   -E switches back to English (default).
  208.           No other character sets are currently supported.
  209.  
  210.        -F     Displays the name  of  the  default  font  and  the
  211.           default font directory, along with the names of the
  212.           figlet fonts in the default directory, then  exits.
  213.           (This will reflect any change of the default direc-
  214.           tory with the -d option, as long    as  -d    is  given
  215.           before the -F).
  216.  
  217.  
  218. EXAMPLES
  219.        To use figlet with its default settings, simply type
  220.  
  221.           example% figlet
  222.  
  223.        and then type whatever you like.
  224.  
  225.        Use the -c option if you would prefer centered output:
  226.  
  227.           example% figlet -c
  228.  
  229.  
  230.        To change the font, use the -f option, for example,
  231.  
  232.           example% figlet -f script
  233.  
  234.  
  235.        To see what fonts are available in the default font direc-
  236.        tory, use -F:
  237.  
  238.           example% figlet -F
  239.  
  240.  
  241.        We have found the most common usage of figlet to be making
  242.        up  large  text to be placed in e-mail messages.  For this
  243.        reason, figlet defaults to 80 column output.  If  you  are
  244.        using  a  wider terminal, and would like figlet to use the
  245.        full width of your terminal, use the -t option:
  246.  
  247.           example% figlet -t
  248.  
  249.  
  250.        If figlet gets its input from a file, it is often  a  good
  251.        idea to use -p:
  252.  
  253.           example% figlet -p < myfile
  254.  
  255.  
  256.        Of course, most of the above can be combined:
  257.  
  258.           example% figlet -ptf shadow < anotherfile
  259.  
  260.  
  261.  
  262. v2.0              9 August 1993             4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. FIGLET(6)                        FIGLET(6)
  269.  
  270.  
  271.           example% figlet -cf slant
  272.  
  273.  
  274.  
  275.    Other Things to Try
  276.        On many systems nice effects can be obtained from the lean
  277.        font by piping it through tr.  Some you might want to  try
  278.        are the following:
  279.  
  280.           example% figlet -f lean | tr ' _/' ' ()'
  281.           example% figlet -f lean | tr ' _/' './\\'
  282.           example% figlet -f lean | tr ' _/' ' //'
  283.           example% figlet -f lean | tr ' _/' '/  '
  284.  
  285.        Similar things can be done with the block font.
  286.  
  287.  
  288. FONT FILE FORMAT
  289.        If  you    would like to design a figlet font, it is usually
  290.        best to begin with an already-existing font.   Except  for
  291.        the  first  line  of  a font file, most of the file format
  292.        should be obvious.  If you design a font,  please  let  us
  293.        know about it!  (See AUTHORS for e-mail addresses.)
  294.  
  295.        A figlet font filename must have the suffix ``.flf''.
  296.  
  297.        A  figlet font file begins with a header.  The header con-
  298.        sists of one line giving information about the font,  fol-
  299.        lowed by zero or more comment lines, which figlet ignores.
  300.        Following the header is the font data.
  301.  
  302.  
  303.    The Header
  304.        The first line of a figlet font file is of  the    following
  305.        form:
  306.  
  307.           flf2ahardblank height up_ht maxlen smushmode cmt_count
  308.  
  309.        for example:
  310.  
  311.           flf2a$ 6 5 20 15 1
  312.  
  313.        The  first  five  characters  of  a  font  file    should be
  314.        ``flf2a''.  ``flf2'' is the magic number  of  a    figlet    2
  315.        font file.  The next character (`a') is currently ignored.
  316.        It may  mean  something    in  future  versions  of  figlet.
  317.        If/when    it  does,  you    can be sure your fonts will still
  318.        work if this character is `a'.
  319.  
  320.        Immediately following this is the  hardblank  (character).
  321.        Note  that  there  are no blanks between ``flf2a'' and the
  322.        hardblank.  figlet can smush together consecutive  charac-
  323.        ters  in  various  ways.   Normally,  any character can be
  324.        smushed into a blank.  A hardblank prints as a blank,  but
  325.  
  326.  
  327.  
  328. v2.0              9 August 1993             5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. FIGLET(6)                        FIGLET(6)
  335.  
  336.  
  337.        cannot  be smushed into any character except a blank, and,
  338.        if smushmode 32 is enabled, another hardblank.  (For exam-
  339.        ple,  the  `r'  in script.flf contains a hardblank, `$' in
  340.        that font.  To see why this is necessary, create a copy of
  341.        script.flf  with  this  hardblank replaced by a blank.  In
  342.        this new font, the ``tr'' combination looks awful.)
  343.  
  344.        By convention, the hardblank is a `$', but it can  be  any
  345.        character  besides  blank,  newline and null.  If you want
  346.        the entire printing ASCII set available to use,    make  the
  347.        hardblank a <delete> character.
  348.  
  349.        Then  comes  the  height (integer).  This is the number of
  350.        screen lines high that each character in the font is.
  351.  
  352.        up_ht (integer) is the number of lines from  the  baseline
  353.        of  a  character  to the top of the character, i.e., it is
  354.        the height of a character, ignoring any descenders.   This
  355.        number is currently ignored by figlet, but future versions
  356.        may use it.
  357.  
  358.        maxlen (integer) is the maximum length of a  line  in  the
  359.        font  file  (excluding  the  first  line  and the comments
  360.        lines, which can be as long as you want).  You are free to
  361.        make  this  a  little (or alot) too large as a safety mea-
  362.        sure.  As an added safety measure,  figlet  adds  a  fudge
  363.        factor to maxlen.
  364.  
  365.        smushmode (integer) determines how much figlet smushes the
  366.        font.  Possible smushmodes are -1 through 63.   Typically,
  367.        you'll  want to use -1 (no smushing), 0 (push font charac-
  368.        ters together until they touch) or 15 (smush various pairs
  369.        of  characters  together  into single characters).  To try
  370.        out different smushmodes with your font, use the  -m  com-
  371.        mand-line  option.  See OPTIONS for a more detailed expla-
  372.        nation of these smushmodes.  (Note that a smushmode of  -2
  373.        can be given on the command line, but not in a font file.)
  374.  
  375.        Between the first line and the actual  characters  of  the
  376.        font  are the comment lines.  Cmt_count specifies how many
  377.        lines there are.  These lines are optional, may be as long
  378.        as you want, and are ignored by figlet.
  379.  
  380.        Thus,  a  complete figlet font file header will look some-
  381.        thing like the following:
  382.  
  383.           flf2a$ 6 5 20 15 1
  384.           Example by Glenn Chappell 7/93
  385.  
  386.  
  387.    The Font Data
  388.        The font data begins on the next line after  the  comments
  389.        and continues to the end of the file.  The characters from
  390.        ` ' to `~' are given in standard ASCII order, followed  by
  391.  
  392.  
  393.  
  394. v2.0              9 August 1993             6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. FIGLET(6)                        FIGLET(6)
  401.  
  402.  
  403.        the  extra German characters: umlauted `A', `O', `U', `a',
  404.        `o' and `u' and s-z.  Each character  uses  height  lines,
  405.        where height was given on the first line of the font file.
  406.        The characters in the  file  are  given    exactly  as  they
  407.        should be printed out, with two exceptions: (1) hardblanks
  408.        should be the hardblank character, not a  blank,  and  (2)
  409.        every line has an endmark character.
  410.  
  411.        In  most  figlet  fonts, the endmark is either `@' or '#'.
  412.        figlet eliminates the  last  block  of  consecutive  equal
  413.        characters  from  each  line (other than the header lines)
  414.        when the file is read in.  By convention, the last line of
  415.        a  font    character has 2 endmarks, while all the rest have
  416.        one.  This makes it easy to see where characters begin and
  417.        end.  No line should have more than 2 endmarks.
  418.  
  419.        It  is  very  important that every character in a font has
  420.        the same height, and, once the endmarks are removed,  that
  421.        all  the  lines    constituting a single font character have
  422.        the same length.  Be careful also that  no  lines  in  the
  423.        font  file have trailing blanks, as figlet will take these
  424.        to be the endmarks.
  425.  
  426.        If you don't want to define all the characters,    make  the
  427.        undefined characters empty, i.e., each line of the charac-
  428.        ter should consist only of an endmark.
  429.  
  430.        The blank character should usually  be  made  entirely  of
  431.        hardblanks.  (Some slanted fonts are an exception.)
  432.  
  433.        Again, if you design a font, please let us know!
  434.  
  435.  
  436. FILES
  437.        file.flf        figlet font file
  438.  
  439.  
  440. DIAGNOSTICS
  441.        figlet's  diagnostics are intended to be self-explanatory.
  442.        Possible messages are
  443.  
  444.           Usage: ...
  445.           Out of memory
  446.           Unable to open font file
  447.           Not a Figlet 2 font file
  448.           Unable to open directory
  449.  
  450.           "-t" is disabled, since ioctl is not fully implemented.
  451.  
  452.        This last message is printed when the -t option is  given,
  453.        but  the operating system in use does not include the sys-
  454.        tem call figlet uses to determine the terminal width.
  455.  
  456.  
  457.  
  458.  
  459.  
  460. v2.0              9 August 1993             7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. FIGLET(6)                        FIGLET(6)
  467.  
  468.  
  469. ORIGIN
  470.        ``figlet'' stands for ``Frank, Ian and Glenn's  LETters''.
  471.        Inspired by Frank's
  472.  
  473.        Most  of  the  figlet fonts were inspired by signatures on
  474.        various UseNet articles.  Since typically hundreds of peo-
  475.        ple  use the same style of letters in their signatures, it
  476.        was not deemed necessary to give credit to  any    one  font
  477.        designer.
  478.  
  479.  
  480. BUGS
  481.        Very  little  error checking is done on font files.  While
  482.        figlet tries to be forgiving of errors, and should  (hope-
  483.        fully) never actually crash, using an improperly-formatted
  484.        font file with figlet will produce unpredictable output.
  485.  
  486.        figlet does not handle formatting  characters  in  a  very
  487.        intelligent way.  A tab character is converted to a blank,
  488.        and vertical-tab, form-feed and carriage-return    are  each
  489.        converted to a newline.    On many systems, tabs can be han-
  490.        dled better by piping files through expand  before  piping
  491.        through figlet.
  492.  
  493.        figlet  output  is quite ugly if it is displayed in a pro-
  494.        portionally-spaced  font.   I  suppose  this  is   to   be
  495.        expected.
  496.  
  497.  
  498. AUTHORS
  499.        Glenn  Chappell    <ggc@uiuc.edu> did most of the work.  You
  500.        can e-mail him but he is not an e-mail  fanatic...  people
  501.        who  email  Glenn  will    probably  get answers, but if you
  502.        email his best friend:
  503.  
  504.        Ian Chai <spectre@uiuc.edu> (or figlet@uiuc.edu),  who  is
  505.        an  e-mail  fanatic, you'll get answers, endless conversa-
  506.        tion about the mysteries of life, invitations to join some
  507.        473  mailing  lists  and a free toaster.  (Well, ok, maybe
  508.        not the free toaster.)
  509.  
  510.        Frank inspired this whole project with his .sig, but don't
  511.        email him... he's decidedly an un-email-fanatic.
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526. v2.0              9 August 1993             8
  527.  
  528.  
  529.