I have a jpeg button script that works great with the default fonts, but try "arial", "arial.ttf", "/arial.ttf", "../arial.ttf", "/home/user/map/arial.ttf" or anything even vaguely similar and it's hopeless... all I see is red-X boxes.
I tried the above script as well, with my own image, and it likewise failed (red-X boxes).
We have the latest GD installed, as well as the latest php, and T1lib.
Do I need to LOAD fonts onto the server? Isn't T1lib a font "LIBRARY"? Doesn't that mean it comes with fonts?
Do I need to load fonts onto the server? How do I load fonts onto the server? Where will they go? How do I call them? Who am I? Why am I here?
Any help would be really great!!!
<?php
header("Content-type: image/jpeg");
$string = $_GET['text'];
$im = imagecreatefromjpeg("button1.jpg");
$red = imagecolorallocate($im, 102, 0, 0);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
// imagestring($im, 3, $px, 9, $string, $red);
imagettftext ($im, 20, 0, $px, 29, $red, "/arial.ttf", $string);
imagejpeg($im,'',100);
imagedestroy($im);
?>