Forum Moderators: coopster
<?php
$im = imagecreatefrompng('bars/title_test.png');
putenv('GDFONTPATH=usr/www/users/mimi7818/fonts/');
$fontname="HIROSHT";
$texttobeadded = "test text for button";
$x = 10;
$y = 100;
$color = imagecolorallocate ($im, 249,255,0);
imagettftext ($im,50,0,$x,$y,$color,arial,$texttobeadded);
header ('content-type: image/png');
imagepng ($im);
?>
i get this error
Warning:# imagettftext(): Could not find/open font in /usr/www/users/mimi7818/add_text_to_bar_image.php on line 10
1.please could you tell me what is wrong?
2.is the gdfontpath absolute or relative? if so how do i find out the correct path?
3.do i need to include .ttf in my font name?
4.can i include a path in my font name?