I have been wanting a method to easily create custom font headings on the fly. Using a cakephp helper I can easily accomplish this. Now all I have to do is enter my text with the handy cakephp FX view helper.
1 - Just place the extracted fx.php file in your app/views/helpers directory.
2 - create the directory app/fonts and add any .ttf files you want to use.
3 - Add "Fx" to the controller var $helpers array.
text2image (string $text, array $Options=array())
Creates the heading image as .png file and returns an image tag of the text value with options applied. Created images are cached in the /app/webroot/img/fx directory.
"height"=>22, The height in pixels of the heading. Should generally be larger than the font size.
"width"=>160, The width in pixels of the heading.
"font"=>"kremlin.ttf", The font to be used for the heading
"colorHex"=>"", Hex color of font. NOTE: setting Hex will override any RGB color.
"colorRGB"=>"139,35,35", RGB color of font.
"size"=>20, The font size in pixels of the heading.
"angle"=>0, The angle of the text output.
"style"=>'', The styling to be applied to the outputted image tag.
"shadow"=>true, Boolean for creating a 1 pixel drop shadow of the text.
$fx->text2image("I love Design",array("style"=>"border:0px","font"=>"arialblack.ttf","colorHex"=>"C0C0C0"));