PHP code example of topazdom / figleti

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

    

topazdom / figleti example snippets




opazdom\Figlet\Figlet;

// Default font is "big"
$figlet = new Figlet();

//Outputs "Figlet" text using "small" red font in blue background.
$figlet
    ->setFont('small')
    ->setFontColor('red')
    ->setBackgroundColor('blue')
    ->write('Figlet');

//Returns rendered string.
$renderedFiglet = $figlet->render('Another Figlet')

- setFontDir(__DIR_ . '/fonts') // Change default font directory
- setFontStretching(3) // Add spaces between letters