Date: 09/30/00
- Next message: peter <email protected>: "[PHP-DEV] PHP 4.0 Bug #6961: umask() returns nothing under NT"
- Previous message: danradigan <email protected>: "[PHP-DEV] PHP 4.0 Bug #6960: Cannot find/load truetype font"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 6960
User Update by: danradigan <email protected>
Status: Open
Bug Type: *Graphics related
Description: Cannot find/load truetype font
the file adventure.ttf is in the same dir as the script --Dan
Previous Comments:
---------------------------------------------------------------------------
[2000-09-30 10:23:46] danradigan <email protected>
I ran the PHP Easy installer for windows and get this error on my win2k system. The behavior exists on NT4 as well. It seems to run OK on Linux though.
PHP OUTPUT---
<br>
<b>Warning</b>: Could not find/open font in <b>c:inetpubwwwrootfreewaystestgd2.php3</b> on line <b>5</b><br>
<br>
<b>Warning</b>: Could not find/open font in <b>c:inetpubwwwrootfreewaystestgd2.php3</b> on line <b>15</b><br>
<br>
<b>Warning</b>: Could not find/open font in <b>c:inetpubwwwrootfreewaystestgd2.php3</b> on line <b>16</b><br>
PNG
IHDR_ PLTE,mp>IDATx1 Om
>
QJIENDB`<br>
<b>Warning</b>: Unknown list entry type in request shutdown (15605704) in <b>c:inetpubwwwrootfreewaystestgd2.php3</b> on line <b>18</b><br>
MY CODE-----------
<?
Header( "Content-type: image/png");
$s=40;
$size = imagettfbbox($s,0, "Adventure.ttf",$text);
$dx = abs($size[2]-$size[0]);
$dy = abs($size[5]-$size[3]);
$xpad=9;
$ypad=9;
$im = imagecreate(400,400);
$blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
$black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 176,0,0);
$font= "Adventure.ttf";
ImageTTFText($im, $s, 0, (int)($xpad/2)+22, (int)($ypad/2)-8, $black, $font, $text);
ImageTTFText($im, $s, 0, (int)($xpad/2)+10, (int)($ypad/2)+9, $white, $font, $text);
Imagepng($im);
ImageDestroy($im);
?>
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6960
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: peter <email protected>: "[PHP-DEV] PHP 4.0 Bug #6961: umask() returns nothing under NT"
- Previous message: danradigan <email protected>: "[PHP-DEV] PHP 4.0 Bug #6960: Cannot find/load truetype font"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

