note 45744 deleted from function.imagettftext by nlopess
| From: | nlopess@php.net | Date: | Fri, 17 Sep 2004 09:34:58 +0000 |
| Subject: | note 45744 deleted from function.imagettftext by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76865@lists.php.net to get a copy of this message | ||
Note Submitter: Adrian
----
Hello!
I have php 4.3.0 and GD2 library (and I use Xitami Server on Windows)...
I tried to use following script:
<?php
header("Content-type: image/jpeg");
$im = imagecreate(400, 30);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagettftext($im, 20, 0, 10, 20, $black, "font.ttf",
"Testing...");
imagejpeg($im);
imagedestroy($im);
?>
Internet Explorer displays this message:
Warning: imagettftext() [function.imagettftext]: Could not find/open font in C:\PROGRAM
FILES\XITAMI\webpages\adrian\ses.php on line 9
ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality (...)
I used following code combinations but without any possitive results:
imagettftext($im, 20, 0, 10, 20, $black, "font", "Testing...");
imagettftext($im, 20, 0, 10, 20, $black, "font.ttf", "Testing...");
imagettftext($im, 20, 0, 10, 20, $black, "C:\Program
Files\Xitami\webpages\adrian\font.ttf", "Testing...");
imagettftext($im, 20, 0, 10, 20, $black, "http://localhost/adrian/font.ttf",
"Testing...");
What can I do to display my php script correctly??
Should I have addictional libraries to use imagettftext function?
Cheers for now!