This is a php5 library (two classes) I wrote to convert TrueType Font text into an image, using the GD library.
The project is hosted and can be downloaded from github: http://github.com/hayate/tic (it includes an example, documentation and some free fonts)
or using git:
git clone git://github.com/hayate/tic.git
Documentation is also available online here: http://www.andreabelvedere.com/docs/tic/
To extend the library to add support for other Font types just extend the TIC abstract class and implement the
See example below on how to use it:
* @file image.php
->setText('Hello World !')
->setBgColor(0x00, 0xff, 0xff)
->setFontColor(0x00, 0x00, 0x00)
Than in your html:
<img src="image.php" alt="TIC" />
That will output the following image:
The library is under the LGPL license, which means you can freely use it for commercial and non commercial applications, please post a comment for feedbacks, bugs, or links of projects where you have use it.
This example focuses on 3 aspects of the Zend Framework (v1.6):
the Zend_Layout mechanism, modules and helpers, including the ActionStack helper and a custom helper. (Please note that there is no Smarty involved in this example).
The main objective of this post is to demonstrate how components of ZF work together to produce a simple application, for this reason I will focus on the code that holds things together rather than going through line by line.
If you have any questions or things are not clear please leave a comment.
As in the previous posts in the series you can download the full working example here: zend_layout_example.zip (3.36 MB). (Note: the compressed file includes the ZF library hence about 3MB)
Please glance at the previous post on this series for hints on how to set up this example on your working server.
Lets start where all begins:
Since the first post on this series I have been working with the Zend Framework and Smarty extensively and I have greatly improved my previous integration between Smarty template engine and ZF.
I have prepared and example that you can download from the following link:
zend.zip (3.5 MB) the compressed file includes the ZF and Smarty packages.
The zip file should unpack as follow: …
I have been using Smarty (php template engine) for quite some time but I am really new to Zend Framework, in fact I started using it for the first time yesterday.
To do the integration i found two very good articles:
However both articles refer to an older version of Zend Framework and they are a bit confusing if you are a Zend beginner like me. On this post i assume Zend Framework version 1.5 and Smarty 2.6.19 (but should work with older Smarty too). …