note 39936 added to function.imagettftext

From: Date: Mon, 16 Feb 2004 10:33:55 +0000
Subject: note 39936 added to function.imagettftext
Groups: php.notes 
Request: Send a blank email to php-notes+get-65205@lists.php.net to get a copy of this message
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 ... ---- Manual Page -- http://www.php.net/manual/en/function.imagettftext.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39936 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39936&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39936&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#65205) next »