Re: ImageTTFBBox() hanging?

From: Date: Wed, 03 Sep 2003 14:23:11 +0000
Subject: Re: ImageTTFBBox() hanging?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-161556@lists.php.net to get a copy of this message
Hello Kevin, Maybe, the problem is with the TTF file (3rd param for imagettfbox())? Did you try to replace it by another one? KB> Hi. I'm new to the list, but not new to PHP. KB> Anyway, I have a small PHP script that was meant to help learn about KB> doing stuff with the GD library. Basically, it opens an image of a KB> button and centers text on top of it, then displays it. To center the KB> text, it uses ImageTTFBBox(). However, it appears that whenever I use KB> this call, the PHP script hangs, and after about 10 seconds my web KB> browser (Safari) says that it couldn't read any data from the server (I KB> assume this means the server closed the connection without sending any KB> data to the browser). If I comment out the call, the script proceeds KB> just fine. KB> Actually, after looking at it again, it does the exact same behaviour KB> on ImageTTFText(). I can't figure out what the problem is, unless it KB> somehow hangs on reading in the TrueType font. KB> Can anybody figure out what my problem could be? Alternately, if nobody KB> can do that, is there any way to figure out the width/height of font KB> rendered using the built in fonts (i.e. 1-5 with imagestring())? KB> For reference, my script can be found here: KB> <http://kballard.res.wpi.net/button.phps> KB> -- KB> Kevin Ballard KB> kevin@sb.org KB> http://www.tildesoft.com -- Best regards, MuToGeN mailto:mutogen@pisem.net

« previous php.general (#161556) next »