PHP code example of the-alex-mark / figlet

1. Go to this page and download the library: Download the-alex-mark/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/ */

    

the-alex-mark / figlet example snippets


$figlet = new Figlet();
$figlet

    // Указание иной директории хранения файлов для использования пользовательского набора шрифтов
    ->setStorage(__DIR__ . '/../assets/fonts')

    // Параметры отображения текста
    ->setFont('slant')
    ->setWidth(200)
    ->setSmushing(FigletContract::SM_BIGX)
    ->setHandleParagraphs(false)
    ->setJustification(FigletContract::JUSTIFICATION_LEFT)
    ->setBackward(false)
    ->setStretching(0)
    ->write('Hello World!');

// Вспомогательный метод
echo figlet('Hello World!', [ 'smushing' => FigletContract::SM_BIGX ]);