PHP4 built with GD1.7 and a FreeType 1.x support. GD and FreeType libraries are set up from BSD-packages.
<?
$font = "Avg45__c.ttf";
$image = imagecreatefrompng("header-template.png");
$black = imagecolorallocate($image, 0, 0, 0);
// let's know the size of the text to be drawn
$s = ImageTTFBBox(12, 0, $font, $text);
// and now write it down in the center of the picture
$t = ImageTTFText($image, 12, 0, 170-($s[4]-$s[6])/2, 6+($s[1]-$s[7])/2, $black, $font, $text);
// save image to disk
imagepng($image, "uno.png");
// free memory
imagedestroy($image);
?>