Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  TEXT::FIGLET::RANSOM (3)

.ds Aq ’


Text::FIGlet::Ransom - blended/composite font support for Text:FIGlet



  use Text::FIGlet;

  my $ransom = Text::FIGlet->new(-f=>[ qw/big block banner/ ]);

  print $ransom->figify("Hi mom");

  _|    _|  (_) #    #        #    #
  _|    _|   _  ##  ##   ___  ##  ##
  _|_|_|_|  | | # ## #  / _ \ # ## #
  _|    _|  | | #    # | (_) |#    #
  _|    _|  |_| #    #  \___/ #    #
                #    #        #    #


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 <B>Text::FIGletB> still does not support smushing.


Treat 0x20 specially?
Unicode support...



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.
<B>-f=>B>\@fonts | \%fonts The array reference form accepts a reference to a list of fonts to use in constructing the new font. When the object is instantiated <B>RansomB> iterates over all of the codepoints, randomly copying the glyph for that index from one of the specified fonts.

The hash form accepts a reference to a hash with fonts as keys, and regular expressions as values. If a character matches the supplied regular expression, the glyph for that character is copied from the corresponding font. In addition, a default font to pull glyphs from <B>must be includedB>, but it is specified in reverse, with a key of undef and the font as the value.

  Text::FIGlet->new(-f=>{block=E<gt>qr/[ A-Z]/, undef=>lean})

  _|_|_|_|_|                          __
      _|         _____  ____  ____   / /
      _|        / ___/ / __ \/_  /  / /
      _|       / /    / /_/ / / /_ /_/
      _|      /_/     \____/ /___/(_)

In the text above, font means any value accepted by the <B>-fB> parameter of Text::FIGlet::new.

In either form, an error occurs if less than 2 fonts are given.

<B>-U=>B>boolean Not yet implemented.

A true value is necessary to load Unicode font data, regardless of your version of perl. <B>The default is falseB>.

<B>Note that you must explicitly specify B>1<B> if you are mapping in negative characters with a control fileB>. Otherwise, -1 is more appropriate. See CAVEATS in Text::FIGlet::Font for more details.

<B>-vB>=>’vertical-align 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, thusly having their loops in line with o.
bottom Align the bottom of the glyphs
random Randomly select an alignment for each character when assembling the font.

For code simplicity baseline is not one of the random alignments used, and instead center is twice as likely for an overall distribution of 25% top, 50% center and 25% bottom.


Inherited from Text::FIGlet::Font.


Returns a string containing the current font. This allows for the preservation of the current (random) font for reuse, and to avoid the performance penalty incurred upon <B>RansomB>-ization.

To cope with the vagaries of input font formatting, a frozen <B>RansomB> font has hardblank & endmark characters converted to DEL (x7F) and US (x1F) respectively.

The frozen font also includes as comments the parameters used to create it. The comments for random ARRAYREF fonts, a map of which characters are pulled from which source font.


<B>Text::FIGlet::RansomB> will make use of these environment variables if present
FIGLIB The default location of fonts. If undefined the default is /usr/local/share/figlet


<B>RansomB> does not work well with <B>-mB> modes other than -1 & 0 at this time.

As noted above, though it is easy to overlook, <B>RansomB> only supports ASCII input.

Very few so-called monospace display fonts are fixed-width across all codepoints, and the results of mixing FIGlet and TOIlet fonts may be mangled in such a font. Some true monspace fonts include Bitstream Monospace and GNU FreeFont FreeMono. OCR A Std and OCR B MT also work at 9, 11 and 12 points, but not 10.


Text::FIGlet::Font, Text::FIGlet, figlet(6)


Jerrad Pierce

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

Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 TEXT::FIGLET::RANSOM (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.