Page 1 of 1
Universal TFF + PHP?
Posted: Fri May 30, 2008 3:47 pm
by Citizen
Is there any way to use these functions:
http://us3.php.net/imagettfbbox
http://us2.php.net/imagettftext
Without having ttf enabled on the server?
Re: Universal TFF + PHP?
Posted: Fri May 30, 2008 3:51 pm
by onion2k
No.
Re: Universal TFF + PHP?
Posted: Fri May 30, 2008 3:54 pm
by Citizen
Is there an alternative that can be used with just GD, even with less quality?
Re: Universal TFF + PHP?
Posted: Fri May 30, 2008 4:04 pm
by onion2k
There's GD's built in text (imagestring()..) but that's a little limited. There's imagepstext() if your version of PHP has been compiled with t1lib. There's imagefttext() too, though that requires freetype which I assume you don't have else imagettftext() would also work.
If none of those work then there's always bitmap fonts.. essentially you draw each letter you need into an image (or series of images like a.png, b.png, c.png etc), load them and using imagecopy() to "write" the text letter by letter. It might sound awful but it's actually a really good technique for very complicated, artistic lettering.