This example shows how to display font in php gd.
This example shows how to display font in php gd.<?php
header ("Content-type: image/png");
$handle = ImageCreate (130, 50) or die ("Cannot Create image");
$bg_color = ImageColorAllocate ($handle, 255, 0, 0);
$txt_color = ImageColorAllocate ($handle, 0, 0, 0);
ImageTTFText ($handle, 20, 15, 30, 40, $txt_color, "C:/WINNT/Fonts/arial.ttf", "Rose");
ImagePng ($handle);
?>
After running the program you will get the following output