i had tried to display dynamic font changing through image making. when i try to display i got an error message :
Could not find/open font in <b>/home2/zuthaco/public_html/invitation/imgmake.php</b> on line <b>32</b><br>
can plz reply me how to rectify this error and also mesntion reason for error.
$word = $wording;
$word1 = str_replace ("\n", "\r\n", $word);
// $fontface = "/invitation/fonts/".$typeface.".ttf";
$fontface = "/home2/zuthaco/public_html/invitation/fonts/".$typeface.".ttf";
$inkcolor = $inkcolor;
$b1 = substr($inkcolor,0,2);
$b2 = substr($inkcolor,2,2);
$b3 = substr($inkcolor,4,2);
$r= hexdec($b1);
$g= hexdec($b2);
$b= hexdec($b3);
$wordarray = explode("\n",$word);
for($i=0;$i<count($wordarray);$i++)
{
// $imgarray = ImageTTFBBox(20,0,$fontface,$wordarray[$i]);
Header("Content-type: image/jpeg");
// $h = $imgarray[0] + $imgarray[1];
$h = 25;
// $w = $imgarray[4] + $imgarray[5];
$w = 200 + 50;
$im = imagecreate ($w,$h);
$bg = ImageColorAllocate ($im, 255, 255, 255);
$tx = ImageColorAllocate ($im, $r,$g,$b);
ImageTTFText ($im, 20, 0, 10, 20, $tx,$fontface,$wordarray[$i]);
ImageJPEG ($im,"/home2/zuthaco/public_html/invitation/dimages/pic".$i.".jpg");
ImageDestroy ($im);
}
/* echo "<body><table>";
for($i=0;$i<count($wordarray);$i++)
{
$imgname = "dimages/pic".$i.".jpg";
echo "<tr><td align=$alignment>";
echo "<img src=$imgname border=0></td></tr>";
}
echo "</table></body>"; */