header("Content-type: image/png");
$im = imagecreatetruecolor(200, 300);
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);
imagefilledrectangle($im, 0, 0, 200, 300, $white);
//GDF FONTS
$font = imageloadfont("anonymous.gdf");
imagestring($im, $font, 0, 0, "HELLO", $black);
$font = imageloadfont("automatic.gdf");
imagestring($im, $font, 0, 40, "HELLO", $black);
$font = imageloadfont("systemex.gdf");
imagestring($im, $font, 0, 70, "HELLO", $black);
$font = imageloadfont("addlg10.gdf");
imagestring($im, $font, 0, 90, "HELLO", $black);
//GD BUILT IN FONTS
//$IM, SIZE, X, Y, TEXT, COLOR
imagestring($im, 1, 5, 125, "HELLO WORLD!", $black);
imagestring($im, 2, 5, 150, "HELLO WORLD!", $black);
imagestring($im, 3, 5, 180, "HELLO WORLD!", $black);
imagestring($im, 4, 5, 210, "HELLO WORLD!", $black);
imagestring($im, 5, 5, 240, "HELLO WORLD!", $black);
imagepng($im);
imagedestroy($im);
?>
Download GD fonts used on this page.
GD FONTS