Hello,
I just installed GD Library and after having a minor crisis about .GIF images which I worked successfully I'm having another, this code I got from this website:
<?
Header("Content-type: image/jpeg");
if(!isset($s)) $s=11;
$size = imagettfbbox($s,0, "/fonts/times.tff",$text);
$dx = abs($size[2]-$size[0]);
$dy = abs($size[5]-$size[3]);
$xpad=9;
$ypad=9;
$im = imagecreate($dx+$xpad,$dy+$ypad);
$blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
$black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 255,255,255);
ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "/fonts/times.tff", $text);
ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "/fonts/times.tff", $text);
ImageJPEG($im);
ImageDestroy($im);
?>
which upon being called from another webpage <IMG SRC="test.php?s=10&text=PHP+is+Cool"> generated a blank page so I thought it had something to do with the fonts and changed the paths to: "C:/WINDOWS/Fonts/times.ttf". Upon running this code I got a tiny little box without any text. So where do I place the .ttf files or where can I view the ones I have a choice from to use? Thanks very much.