NAME
Text::FIGlet::Ransom - composite font support
SYNOPSIS
use Text::FIGlet;
my $ransom = Text::FIGlet->new(-f=>[ qw/big block banner/ ]);
print $ransom->figify("Hi mom");
_
_| _| (_) # # # #
_| _| _ ## ## ___ ## ##
_|_|_|_| | | # ## # / _ \ # ## #
_| _| | | # # | (_) |# #
_| _| |_| # # \___/ # #
# # # #
DESCRIPTION
This class creates a new FIGlet font using glyphs from user-specified fonts. Output from the resulting hybrid font is suitable for basic textual CAPTCHA, but also has artistic merit. As the output is automatically generated though, some manual adjustment may be necessary; particularly since Text::FIGlet still does not support smushing.
TODO
- Treat 0x20 specially?
- Instantiation via Text::FIGlet
-
Font if -f is a string, Ransom if an array/hash ref
OPTIONS
new
Loads the specified set of fonts, and assembles glyphs from them to create the new font.
Except where otherwise noted below, options are inherited from Text::FIGlet::Font.
- -f=>\@fonts | \%fonts
-
The array reference forms accepts a reference to a list of fonts to use in constructing the new font. When the object is instantiated Ransom iterates over all of the codepoints, randomly copying the glyph for that index from one of the specified fonts.
The hash form is not yet implemented, but will accept a hashref with a font as key, and a regular expression as values which matches the glyphs from that font to be used in the ransomed font. A default font to pull glyphs from is specified with a key of
undef
and the font as the value.Text::FIGlet::Ransom->new(-f=>{slant=E<gt>qr/a-z/, undef=>'./Doh.flf'})
In the text above, font means any value accepted by the -f parameter of
Text::FIGlet::new
. - -U=>boolean
-
A true value is necessary to load Unicode font data, regardless of your version of perl. The default is false.
Note that you must explicitly specify 1 if you are mapping in negative characters with a control file. Otherwise, -1 is more appropriate. See "CAVEATS" in Text::FIGlet::Font for more details.
- -v=>'vertical-align'
-
Not yet implemented.
Because fonts vary in size, it is necessary to provide vertical padding around smaller glyphs, and this option controls how the padding is added. The default is to center the glyphs.
- top
-
Align the tops of the glyphs
- center
-
Align the center of the glyphs
- baseline
-
Align the the base of the glyphs i.e; align characters such as "q" and "p" as if they had no descenders.
- bottom
-
Align the bottom of the glyphs
- random
-
Randomly select an alignment for each character when assembling the font.
figify
Inherited from Text::FIGlet::Font.
freeze
Not yet implemented.
Allow for the preservation of the current (random) font for reuse, and to avoid the performance penalty incurred upon Random-ization.
ENVIRONMENT
Text::FIGlet::Ransom will make use of these environment variables if present
- FIGLIB
-
The default location of fonts. If undefined the default is /usr/games/lib/figlet
CAVEATS
Cannot (yet) ransom with TOIlet fonts.
SEE ALSO
Text::FIGlet::Font, Text::FIGlet, figlet(6)
AUTHOR
Jerrad Pierce
** />>
_ // _ _ _ / >>>
(_) ** ,adPPYba, >< ><<< _(_)(_)(_) / >>>
| | /** a8P_____88 ><< (_) >> >>>
| | |~~\ /** 8PP""""""" ><< (_) >>>>>>>>
_/ | |__/ /** "8b, ,aa ><< (_)_ _ _ >>>>>>> @cpan.org
|__/ | /** `"Ybbd8"' ><<< (_)(_)(_) >>
// >>>> /
>>>>>>/
>>>>>
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 202:
You forgot a '=back' before '=head1'