Zend Framework: Zend_Figlet Component Proposal
| Proposed Component Name | Zend_Figlet |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Zend_Figlet |
| 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: 19) |
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 zend.svn.dasprids.de
- 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
| UC-01 |
|---|
$figlet = new Zend_Text_Figlet();
echo $figlet->generate('Zend_Text_Figlet Demo');
9. Class Skeletons
Cewl! I'd allow to pass a Zend_Config section to the constructor though.
How would this integrate with Zend_Form? That might be something to think about.
Great idea!
I do not know FIGLet, but I saw a PHP Class similar to this on [phpclasses.org].
However, I saw that we'll can configure "fonts".
The question is: Are there way to write a text merging different fonts?
The classes you find spreaded around the internet do not support FIGlet entirely. Mostly they lack the smushing feature or UTF-8 support.
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).
Just for fun, Zend_FIGlet++ ![]()
I have some problems seeing (a lot of) serious applications for this, but it does look like fun to play with.
Hi Ben, I'm a big fan of FIGlet
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.
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.
| Zend Comments 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:
|
ZF Home Page
Code Browser
Wiki Dashboard
Looks good. I would consider this if I needed captcha.