Zend_Text_Figlet is a Zend component which enables developers to create a FIGlet text. A Figlet is nothing but a technique of creating large letters using ordinary text. I don’t know how to make a use of this in my daily matters, but its a nice recreation. A short history on Figlet can be found here. An example and the code to generate it is shown below.
____ __ _ ____ | _ \\ | || | || | _ \\ | |_| || | '--' || | |_| || | .__// | .--. || | .__// |_|--` |_|| |_|| |_|--` `-` `-` `-` `-`
If you are displaying the output on a web page make sure to use the ‘pre’ tags around the Figlet. The Figlet looks good in a pure text format.
You can also define various options for the Figlet by passing the function an array of options, like say changing the font.
'graffiti.flf'); $figlet = new Zend_Text_Figlet($options); echo $figlet->render('PHP'); ?>
__________ ___ ___ __________ \______ \ / | \ \______ \ | ___// ~ \ | ___/ | | \ Y / | | |____| \___|_ / |____| \/
You can download more fonts from here.
The default width of the Figlet output is set to 80 characters, which you can change with the ‘outputWidth’ option.
. . $options = array('outputWidth' => 120);
For more options you can take a look at the documentation.