Furry stuff, oekaki stuff, and other stuff.
You are not logged in.
Hello All,
Am using below code :
header("Content-type: image/png");
$string = $_GET['text'];
$im = imagecreatefrompng("images/button1.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
How to go about it if I want to use different Font Face i.e. Verdana, Arial Rounded or it could be anything. I am using PNG images.
Offline
You need to use the PostScript text function, rather than the string function.
You can read about it (and other GD-lib functions) at the PHP web site: imagepstext()
Beware: this function is very troublesome and might cause problems if your web site doesn't have enough memory allocated for PHP (the 8MB default may not be enough).
Offline