Date: 06/26/01
- Next message: cyril <email protected>: "[PHP-DEV] Bug #11689: can't connect any server with imap c-client 4.1"
- Previous message: ash <email protected>: "[PHP-DEV] Bug #11687: No download through firewalls"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: Helge-Schulz <email protected>
Operating system: Win 98 SE and Win NT 4.0 SP 6
PHP version: 4.0.6
PHP Bug Type: GD related
Bug description: Could not find/open font (ImageTTFBBox, imageTTFText)
Could not find/open font (ImageTTFBBox, imageTTFText)
At version 4.0.5 and earlier it does work.
Now in Version 4.0.6 it doesn't work
<?php
header("Content-type: image/png");
$text = "Test";
$fontfile = "../fonts/times.ttf";
$fontsize = 22;
$fontangle = 0;
$dimtxt = ImageTTFBBox( $fontsize, $fontangle, $fontfile, $text );
$border = 10;
$txtsizex = abs($dimtxt[4] - $dimtxt[0]);
$txtsizey = abs($dimtxt[5] - $dimtxt[1]);
$imgsizex = $txtsizex + 3*$border;
$imgsizey = $txtsizey + 5*$border;
$txtposx = $border;
$txtposy = $txtsizey + $border;
$img = imageCreate( $imgsizex, $imgsizey);
$col1 = imagecolorallocate( $img, 153, 0, 51);
$col2 = imagecolorallocate( $img, 255, 255, 255);
imagefill( $img, 0, 0, $col1);
imageTTFText( $img, $fontsize, $fontangle, $txtposx, $txtposy, $col2, $fontfile, $text );
imagepng( $img );
imagedestroy( $img );
?>
-- Edit Bug report at: http://bugs.php.net/?id=11688&edit=1-- 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: cyril <email protected>: "[PHP-DEV] Bug #11689: can't connect any server with imap c-client 4.1"
- Previous message: ash <email protected>: "[PHP-DEV] Bug #11687: No download through firewalls"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

