1. Go to this page and download the library: Download bolk/text-figlet library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bolk / text-figlet example snippets
use Bolk\TextFiglet\Figlet;
$figlet = new Figlet();
$figlet->loadFont('standard.flf');
echo $figlet->render('Hello!');
$figlet->loadFont('/path/to/custom.flf');
use Bolk\TextFiglet\LayoutMode;
$figlet->setHorizontalLayout(LayoutMode::Smushing); // characters overlap
$figlet->setHorizontalLayout(LayoutMode::Fitting); // characters touch
$figlet->setHorizontalLayout(LayoutMode::FullSize); // full width
$figlet->setWidth(80);
echo $figlet->render('A very long sentence that will be wrapped');
use Bolk\TextFiglet\Justification;
$figlet->setWidth(80);
$figlet->setJustification(Justification::Center);
echo $figlet->render('Centered');
$figlet->setParagraphMode(true);
echo $figlet->render("Hello\nWorld"); // rendered as "Hello World"
echo $figlet->render("Hello\n\nWorld"); // two separate lines