Skip to end of metadata
Go to start of metadata

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Figlet Component Proposal

Proposed Component Name Zend_Figlet
Developer Notes
Proposers Ben Scholzen
Matthew Weier O'Phinney (Zend Liaison)
Revision 1.1 - 7 April 2008: Initial proposal
1.1 - 9 April 2008: Inserted prototype class skeleton (wiki revision: 20)

Table of Contents

1. Overview

Zend_Text_Figlet is a PHP implementation of the computer program "FIGlet". It can be useful if you want to create captchas for example, which are also usable for text browsers.

The output on text browsers and gfx browser could look like this:

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will read the FIGlet font file format
  • This component will support a GZIP compressed font files
  • This component will support output width for automatic line break
  • This component will allow to force specific smushing modes
  • This component will support multiple encodings via iconv

4. Dependencies on Other Framework Components

  • Zend_Text_Exception

5. Theory of Operation

The component will be instantiated with a font filename. If no filename is supplied, a default font will be used. After the instantiation, you can use the component to convert strings into FIGlet strings.

6. Milestones / Tasks

  • Milestone 1: [done] Proposal finished
  • Milestone 2: [done] Working prototype checked into the
  • Milestone 3: [done] Component approval
  • Milestone 4: [done] Working prototype checked into the incubator
  • Milestone 5: [done] Unit tests exist, work, and are checked into SVN.
  • Milestone 6: [done] Documentation exists.

7. Class Index

  • Zend_Text_Figlet
  • Zend_Text_Figlet_Exception

8. Use Cases


$figlet = new Zend_Text_Figlet();
echo $figlet->generate('Zend_Text_Figlet Demo');

9. Class Skeletons



figlet figlet Delete
ascii ascii Delete
text text Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Apr 08, 2008

    <p>Looks good. I would consider this if I needed captcha.</p>

  2. Apr 09, 2008

    <p>Awesome <ac:emoticon ac:name="laugh" /><br />

  3. Apr 10, 2008

    <p>Cewl! I'd allow to pass a Zend_Config section to the constructor though. </p>

    <p>How would this integrate with Zend_Form? That might be something to think about.</p>

    1. Apr 10, 2008

      <p>The integration would be a simple Zend_Form_Element. And $options can either be an array or a Zend_Config object. I did not take the $fontFile into the $options variable, since it is a really constructor based thing, nothing which could be changed afterwards.</p>

  4. Apr 10, 2008

    <p>Great idea!</p>

    <p>I do not know FIGLet, but I saw a PHP Class similar to this on <ac:link><ri:page ri:content-title="" /></ac:link>.<br />
    However, I saw that we'll can configure "fonts".</p>

    <p>The question is: Are there way to write a text merging different fonts?</p>

    1. Apr 10, 2008

      <p>The classes you find spreaded around the internet do not support FIGlet entirely. Mostly they lack the smushing feature or UTF-8 support.</p>

      <p>Mergin different fonts is not really possible (when speaking about FIGlet). They share different font settings, which are not mergeable. However, what you could do manually would be to render the first text, then the second text, and concatinate them (they should be of the same height then).</p>

  5. Apr 10, 2008

    <p>Just for fun, Zend_FIGlet++ <ac:emoticon ac:name="smile" /></p>

    <p>I have some problems seeing (a lot of) serious applications for this, but it does look like fun to play with. </p>

  6. Apr 10, 2008

    <p>I personally don't see the point, but it looks like quality work on your part. Kudos.</p>

  7. May 24, 2008


    <p>Hi Ben, I'm a big fan of FIGlet <ac:emoticon ac:name="smile" /> </p>

    <p>It's funny that you mentioned FIGlet to create captchas, because I've recently spent some time working on a pattern recognition security tools that is somehow related to this proposal. A software that combines OCR and digital image processing can translate a FIGLet into text in less than 20 seconds. Now a days a lot of the tools are capable of processing images, what results in better and more accurate OCR scans. A captcha adds an extra layer of security to the application, which is a good thing, but with modern hacking or spamming tools, it will not stop an attacker from bypassing it. </p>

    <p>On feb 2008 they cracked Google's captcha, and because of that Google added 2 extra security layers: A bot detector based on known hosts, and a bot detector based on behaviour pattern recognition. What makes it much more effective when combined with a captcha. I found Google's captcha to be one of the most effective, they use well known techniques to create the image. The idea is to combine these tools to stop automated attacks.</p>

  8. Jun 19, 2008

    <ac:macro ac:name="note"><ac:parameter ac:name="title">Zend Comments</ac:parameter><ac:rich-text-body>
    <p>Zend_Figlet is accepted for development in standard/incubator, as part of the basis for a CAPTCHA story within Zend Framework. We have the following requirements and questions:</p>

    <li>Rename to Zend_Text_Figlet</li>
    <li>Will any FIGlet font files be distributed with the component? If so, please verify that these are freely distributable, and include license information with the component.</li>