Page 1 of 1

IMAGEPNG() Fonts...

Posted: Mon Feb 28, 2005 4:15 pm
by Dale
Is there way to change the font on a imagecreate tag?

Code: Select all

<?
header ("Content-type: image/png");
$im = imagecreate(450,73);

$black = imagecolorallocate ($im,0x00, 0x00, 0x00);
$white = imagecolorallocate ($im,0xFF, 0xFF, 0xFF);

imagefilledrectangle($im, 0, 0, 450, 73, $black);
imagestring ($im, 3, 3, 3, "Pe Po", $white);

imagepng ($im);
imagedestroy ($im);
?>
How can i change the text to... erm.. Tahoma... or Verdana... or Arial...

Posted: Mon Feb 28, 2005 4:18 pm
by feyd

Posted: Mon Feb 28, 2005 5:22 pm
by onion2k
Expanding on the imagettftext() function: http://www.ooer.com/index.php?section=php&id=18

Posted: Tue Mar 01, 2005 1:37 am
by Dale
Thank You Both.