Jump to content

How to change font in GD?


eXeCuTeR

Recommended Posts

$im     = imagecreatefrompng("image.png"); //path to image
$color = imagecolorallocate($im, 0, 0, 0); // allocating a color
$font = 'Arial.ttf'

$overall = extract_single("Overall", "</tr>", $page); // Don't mind these lines..
$overall_stat_array = extract_multi("<td align=\"right\">", "</td>", $overall); // Don't mind these lines..
$overall_level = $overall_stat_array[2]; // Don't mind these lines..

imagettftext($im, 12, 0, 10, 20, $color, $font, $overall_level);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.