Re: How do I find out if a string will fit in an area of an image?

From: Date: Wed, 25 Aug 2004 05:07:56 +0000
Subject: Re: How do I find out if a string will fit in an area of an image?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-194649@lists.php.net to get a copy of this message
On Tue, 24 Aug 2004 21:49:03 -0500, Brent Clements <bclem@imaginative-enterprises.com> wrote: > Hi All, > > Let's say I have a string of text. > > $foo = "I WANT ALot of Text to be diSPLAYed!" > > I have an area on my image that is around 386 pixels wide. > > How do I find out if my text will fit in that area using any size font? > Are you using PHP to create this image? If what you mean is: Will the text fit withint a certain space on a browser, the answer is that you can't tell. A user can always override the size of your fonts. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.general (#194649) next »