Home Tutorial Php Phpgd PHP GD font size

 
 

Share on Google+Share on Google+
PHP GD font size
Posted on: November 7, 2009 at 12:00 AM
Advertisement
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

Advertisement

Related Tags for PHP GD font size:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 7, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com