PIM Team Case Study: Creating Text Effects With PHP and GD

By: Bobby Handzhiev

PIM Team Case Study: Creating Text Effects With PHP and GD


See how you can create graphic effects on text with PHP and GD - drop shadows, arcs, fonts and colors.

Problem
A-tec Signs and Sraphics Inc. launched a web site with the idea to sell decals online. To achieve better customers ineterest the website had to integrate online decal builder. The company is offering also decals for vehicles which brought some specific requirements to the builder like having the decal text turning arround 4 types of arcs.

Goals
- Provide users with preview area
- Allow visitors to choose font and color
- Allow adding drop shadow and selecting drop shadow color
- Allow turning the text into arcs
- Real Time calculating

Solution
Because of the need for increasing customers interest we had to think about not for perfect math formulas when showing the graphs in the preview area, but for the people who will look at them.
As we will reaveal below, there were few problems going arround human appreceptions for something 'perfectly smooth' and the matchematical perfect figures.

Methodology
We were going to extensively use PHP GD library for the text effects.

It provided easy changing of fonts and colors, adding drop shawdows and rotating the texts.
We had also to create color palletes which to appear when user click and disappear when color is selected (You can personally try the decals creating Free Reprint Articles, to preview it and to calculate the cost for different sizes and quantities.
The website and builder were promoted with massive radio advertising company. At that time it was the only decal builder which allowed creating texts arround arcs.

Conclusions
- Use GD to create text effects
- Do not forget that you can create you own functions for what GD does not offer
- Do not always search for math perfect formulas. The graphical effects are intended to the human eye
- Load fonts in the server
- Use javascript and hidden layers to achieve great flexibility

Top Searches on
Programming
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 

» More on Programming