NAME

Text::FIGlet::Font - text generation for Text::FIGlet

SYNOPSIS

use Text::FIGlet;

my $font = Text::FIGlet->new(-f=>"doh");

print $font->figify(-A=>"Hello World");

DESCRIPTION

Text::FIGlet::Font reproduces its input using large characters made up of ordinary screen characters. Text::FIGlet::Font output is generally reminiscent of the sort of signatures many people like to put at the end of e-mail and UseNet messages. It is also reminiscent of the output of some banner programs, although it is oriented normally, not sideways.

Text::FIGlet::Font can print in a variety of fonts, both left-to-right and right-to-left, with adjacent characters kerned and smushed together in various ways. FIGlet fonts are stored in separate files, which can be identified by the suffix .flf. Most FIGlet font files will be stored in FIGlet's default font directory.

OPTIONS

new

-D=>boolean

-D 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.

This option is deprecated, which means it may soon be removed from Text::FIGlet::Font. The modern way to achieve this effect is with Text::FIGlet::Control.

-U=>boolean

Process input as Unicode (UTF-8).

Note that this is necessary if you are mapping in negative characters, with a control file, regardless of your verison of perl.

-f=>fontfile

The font to load.

Defaults to standard

-m=>smushmode

Specifies how Text::FIGlet::Font 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 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

Returns a a string or list of lines, depending on context.

-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::Font 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

ENVIRONMENT

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

FIGFONT

The default font to load. If undefined the default is standard.flf. It should reside in the directory specified by FIGLIB.

FIGLIB

The default location of fonts. If undefined the default is /usr/games/lib/figlet

FILES

FIGlet font files are available at

ftp://ftp.figlet.org/pub/figlet/

SEE ALSO

Text::FIGlet, figlet(6)

CAVEATS

$/ is used to create the output string in scalar context
Pre-5.8 Unicode

Perl 5.6 Unicode support was notriously sketchy. Best efforts have been made to work around this, and things should work fine. If you have problems, favor "\x{...}" over chr.

Pre-5.6

This codebase was originally developed to be compatible with 5.005.03, but it has not been tested aganist it for sometime. Indeed, many of its dependencies (core packages) don't seem to even acknowledge the existence of such dated incarnations. Any reports on

-m=>'-0'

#XXX Some fonts use

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

AUTHOR

Jerrad Pierce

              **                                    />>
   _         //                         _  _  _    / >>>
  (_)         **  ,adPPYba,  >< ><<<  _(_)(_)(_)  /   >>>
  | |        /** a8P_____88   ><<    (_)         >>    >>>
  | |  |~~\  /** 8PP"""""""   ><<    (_)         >>>>>>>>
 _/ |  |__/  /** "8b,   ,aa   ><<    (_)_  _  _  >>>>>>> @cpan.org
|__/   |     /**  `"Ybbd8"'  ><<<      (_)(_)(_) >>  
             //                                  >>>>    /
                                                  >>>>>>/
                                                   >>>>>