Categories
PHP

Changing Font Style in PHP Generated Image

To change the font style, you need to use different fonts. You can use the imagettftext() function to draw text on a php generated image using GD. Here’s a code snippet:

Have a look at the function’s doc on php.net to learn more. http://www.php.net/imagettftext 🙂

It’s not that hard! Put the file in the www directory of a ubuntu LAMP server and visit the url on a web browser 🙂