argh imageTTFtext problem
Posted: Sun Apr 27, 2003 3:39 pm
ok here is my script working:
http://www.saundersbc.f2s.com/stat.php?UN=gurlen_borg

you can change UN to any runescape username (if you know what that is)
anyway
when it generates the image it does the text on different lines for some reason!
here is my image code:
i hope someone can help
this is driving me mad
http://www.saundersbc.f2s.com/stat.php?UN=gurlen_borg
you can change UN to any runescape username (if you know what that is)
anyway
when it generates the image it does the text on different lines for some reason!
here is my image code:
Code: Select all
<?php
function drawStat($rank,$xp, $x = 300, $y = 30) {
header("Content-type: image/png");
$image = imagecreate($x,$y);
$fontsize = 12;
$font = "/web/sites/296/saundersbc/www.saundersbc.f2s.com/font.ttf";
$blue = imagecolorallocate($image, 0,0,255);
$white = imagecolorallocate($image, 255,255,255);
imagefill($image, 0, 199, $white);
$text = "Rank: $rank TotalXP: $xp";
imageTTFtext( $image, $fontsize, 0,2,18, $blue, $font, $text);
imagejpeg($image);
}
?>this is driving me mad