Page 1 of 1

Can true type fonts be used to write over png images

Posted: Tue Jun 12, 2007 3:37 am
by deva
Hi,

I used imagecreatefrompng("ur.png"),
and created a png image. Function imagettftext($im, $fontsize, $angle, $xc, $yc, $txtcolor, $fontfamily, $text); does not work here. Can i use imagettftext() if i create png images using imagecreatefrompng()? Could any one advise..

thanks,
deva

Posted: Tue Jun 12, 2007 3:57 am
by Dale
Did you upload the font to a certain directory on your webserver when trying to do this? As it is needed. Check Example 999 on here: http://uk3.php.net/imagettftext

:)

using true type fonts over png images

Posted: Tue Jun 12, 2007 4:58 am
by deva
thanks dale.. yes i uploaded the font.. i saw the example you have mentioned above. the function imagettftext() works well when i use imagecreate(100,100) function. But when i use imagecreatefrompng("ur.png") function, i was able to use only imagestring() function which takes ".gdf" fonts. But i wish to use, ttf fonts. Hence, i like to know, whether its possible to use imagettftext() function while using imagecreatefrompng() function.

thanks,
deva

Posted: Tue Jun 12, 2007 7:59 am
by onion2k
What's your script doing? Is it outputting any errors?