Jerrad Pierce > Text-FIGlet-1.06 > Text::FIGlet

Download:
Text-FIGlet-1.06.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 1.06   Source  

NAME ^

Text::FIGlet - a perl module to provide FIGlet abilities, akin to banner

SYNOPSIS ^

 my $font = Text::FIGlet-E<gt>new(-f=>"doh");
 $font->figify(-A=>"Hello World");

DESCRIPTION ^

But why?

Because I could.

But why?

Because I like FIGlet and Perl.

But why? In Bob's name WHY?! What purpose could it serve?

If you want something more substantive imagine:

OPTIONS ^

new

-D=>boolean

If true, switches to the German (ISO 646-DE) character set. Turns `[', `\' and `]' into umlauted A, O and U, respectively. `{', `|' and `}' turn into the respective lower case versions of these. `~' turns into s-z. Assumin, of course, that the font author included these characters. This option is deprecated, which means it may not appear in upcoming versions of Text::FIGlet.

-d=>fontdir

Whence to load the font.

Defaults to /usr/games/lib/figlet

-f=>fontfile

The font to load.

Defaults to standard

-m=>smushmode

Specifies how Text::FIGlet should ``smush'' and kern consecutive characters together. On the command line, -m0 can be useful, as it tells FIGlet to kern characters without smushing them together. Otherwise, this option is rarely needed, as a Text::FIGlet font file specifies the best smushmode to use with the font. -m is, therefore, most useful to font designers testing the various smushmodes with their font. smushmode can be -2 through 63.

-2 Get mode from font file (default).

       Every  FIGlet  font  file specifies the best
       smushmode to use with the font.   This  will
       be  one  of  the  smushmodes (-1 through 63)
       described in the following paragraphs.

-1 No smushing or kerning.

       Characters are simply concatenated together.

-0 Fixed width.

       This will pad each character in the font such that they are all
       a consistent width. The padding is done such that the character
       is centered in it's "cell", and any odd padding is the trailing edge.

0 Kern only.

       Characters  are  pushed  together until they touch.

figify

-A=>text

The text to transmogrify.

-X=>[LR]

These options control whether FIGlet prints left-to-right or right-to-left. L selects left-to-right printing. R selects right-to-left printing. The default is to use whatever is specified in the font file.

-x=>[lrc]

These options handle the justification of Text::FIGlet output. c centers the output horizontally. l makes the output flush-left. r makes it flush- right. The default sets the justification according to whether left-to-right or right-to-left text is selected. Left-to-right text will be flush- left, while right-to-left text will be flush-right. (Left-to-rigt versus right-to-left text is controlled by -X.)

-w=>outputwidth

The output width, output text is wrapped to this value by breaking the input on whitspace where possible. There are two special width values

 -1 the text is not wrapped.
  1 the text is wrapped after very character.

Defaults to 80

EXAMPLES ^

perl -MText::FIGlet -e 'print Text::FIGlet->new()->figify(-A=>"Hello World")'

ENVIRONMENT ^

Text::FIGlet will make use of these environment variables if present

FIGFONT

The default font to load. It should reside in the directory specified by FIGLIB.

FIGLIB

The default location of fonts.

FILES ^

FIGlet home page

 http://st-www.cs.uiuc.edu/users/chai/figlet.html
 http://mov.to/figlet/

FIGlet font files, these can be found at

 http://www.internexus.net/pub/figlet/
 ftp://wuarchive.wustl.edu/graphics/graphics/misc/figlet/
 ftp://ftp.plig.org/pub/figlet/

SEE ALSO ^

figlet

CAVEATS ^

$/ is used to
split incoming text into seperate lines.
create the output string
parse the font file

Consequently, make sure it is set appropriately i.e.; Don't mess with it, perl sets it correctly for you.

AUTHOR ^

Jerrad Pierce <jpierce@cpan.org>|<webmaster@pthbb.org>

syntax highlighting: