patelp7 Posted March 21, 2007 Share Posted March 21, 2007 I am creating a polling script that creates a graph and i am getting the following error: Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in C:\Program Files\xampp\htdocs\showpoll.php on line 74 Warning: imagettftext() [function.imagettftext]: Could not find/open font in C:\Program Files\xampp\htdocs\showpoll.php on line 80 Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\showpoll.php:74) in C:\Program Files\xampp\htdocs\showpoll.php on line 117 ‰PNG IHDRô2%r¾À_IDATxœíÁ‚ ÿ¯nH@Àƒ%9ÃüútIEND®B`‚ here is my line 74, 80, and 117 $title_dimensions = ImageTTFBBox($title_size, 0, $font, $title); ImageTTFText($im, $title_size, 0, $title_x, $title_y, $text_color, $font, $title); Header('Content-type: image/png'); any help will be much appreciated Quote Link to comment Share on other sites More sharing options...
per1os Posted March 21, 2007 Share Posted March 21, 2007 We need more code because the issue lies within the $font variable. Quote Link to comment Share on other sites More sharing options...
Barand Posted March 21, 2007 Share Posted March 21, 2007 $font needs to contain the path to the font file you want to use, so it should be something like $font = 'path/to/file/arial.ttf'; 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.