PHP code example of vitkutny / ascii

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

    

vitkutny / ascii example snippets


use VitKutny\Ascii\Text;

$text = new Text\Renderer('Hello world!');
$text->setFont(new Text\Font\Figlet(__DIR__ . '/fonts/figlet-font.flf');
$text->render(); //or echo $text;

$text->setStringWrapper(Text\Wrapper::el('pre'));
$text->setLineBreak(Text\Wrapper::el('br'));

$text->setStringWrapper(Text\Wrapper::el('table'));
$text->setLineWrapper(Text\Wrapper::el('tr'));
$text->setPixelWrapper(Text\Wrapper::el('td'));