tinman Posted February 3, 2012 Report Share Posted February 3, 2012 So far I have gotten the background image to generate as randomly as i want but i cant seem to get text to show up. This is my code: $im = imagecreate(400, 30); $white = imagecolorallocate($im, 255, 0, 0); $black = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 399, 29, $white); $text = 'Testing...'; $font = 'arial.ttf'; imagettftext($im, 20, 0, 10, 20, $black, $font, $text); imagepng($im); imagedestroy($im); but when I try to load it, no text appears. Do I need to incorporate my own font file into it? If so how do i do that? Or is it something even more simple that I have missed? Thank you for your time and assistance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.