Bug #11688 Updated: Could not find/open font (ImageTTFBBox, imageTTFText)

From: Date: Fri, 20 Jul 2001 11:28:32 +0000
Subject: Bug #11688 Updated: Could not find/open font (ImageTTFBBox, imageTTFText)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-60371@lists.php.net to get a copy of this message
ID: 11688 Updated by: dbeu Reported By: Helge-Schulz@t-onlie.de Old Status: Open Status: Closed Bug Type: GD related Operating System: Win 98 SE and Win NT 4.0 SP 6 PHP Version: 4.0.6 New Comment: fixed in cvs, thanks. Previous Comments: ------------------------------------------------------------------------ [2001-06-26 03:34:37] Helge-Schulz@t-onlie.de 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 this bug report at http://bugs.php.net/?id=11688&edit=1

« previous php.dev (#60371) next »