note 39936 deleted from function.imagettftext by aidan

From: Date: Mon, 20 Sep 2004 09:57:29 +0000
Subject: note 39936 deleted from function.imagettftext by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-77019@lists.php.net to get a copy of this message
Note Submitter: francisek ---- I tried many tricks to patch the "Could not find/open font" message but didn't want to copy the needed fonts to my php files folder. I finally found that one to use the fonts in C:\\WINNT\\FONTS\\ : I specify the font name without path nor extention and it works fine : <?php header("Content-type: image/jpeg"); $fontname = "arial"; $fontsize = 12; $im = imagecreate(400,30); $white = imagecolorallocate($im, 255,255,255); $black = imagecolorallocate($im, 0,0,0); $text = "Hello world"; imagettfbbox($im, $fontsize, 0, 0, 0, $white, $fontname, $text); ?> It even works fine if $fontname = "/arial"; !!! If anyone knows why it worked for me ...

« previous php.notes (#77019) next »