NAME

Ascii::Text - module for generating ASCII text in various fonts and styles

VERSION

Version 0.09

SYNOPSIS

Quick summary of what the module does.

Perhaps a little code snippet.

use Ascii::Text;

my $foo = Ascii::Text->new(
	color => 'red',
	align => 'center'
);

$foo->("Hello World");

 _   _        _  _                 _    _              _      _
| | | |      | || |               | |  | |            | |    | |
| |_| |  ___ | || |  ___          | |  | |  ___   _ _ | |  __| |
|  _  | / _ \| || | / _ \         | |/\| | / _ \ | '_|| | / _` |
| | | ||  __/| || || (_) |        \  /\  /| (_) || |  | || (_| |
\_| |_/ \___||_||_| \___/          \/  \/  \___/ |_|  |_| \__,_|

SUBROUTINES/METHODS

new

Instantiate a new Ascii::Text object.

my $ascii = Ascii::Text->new(
	font => 'Boomer',
	max_width => 100
);

render

Print to the terminal the passed string as ascii text.

$ascii->render("Hello World");

ATTRIBUTES

max_width

Set/Get the max width of a line of text by default this uses Term::Size::ReadKey so that the max width of your terminal is used.

$ascii->max_width(100);

pad

Set/Get the left padding of the text on a line. When "align" is set to center or right this value will become redundant. The default value is 0.

$ascii->pad(10);

font

Set/Get the reference to the font class.

$ascii->font("Boomer");

align

Set/Get the alignment of the text on the line. Options are left, center or right.

$ascii->align('right');

color

Set/Get the font color

$ascii->color("red");

color_map

Override the default ANSI color map.

$ascii->color_map({
	red => "\e[31m",
	...
});

AUTHOR

LNATION, <email at lnation.org>

BUGS

Please report any bugs or feature requests to bug-ascii-text at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Ascii-Text. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Ascii::Text

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2024 by LNATION.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)