Helpful Information
 
 
Category: Read An Article
Small Tutorial on GD Library [Freetype]

Ok this is pretty much an addition of my previous thread about the GD Library (http://www.vbulletin.org/forum/showthread.php?s=&postid=372738). This is just a small tutorial on how to get Freetype to work since it took me far too long before I realized it came with PHP.

Requirements
PHP 4.3.1 (this comes with the GD Library & Freetype

This is actually pretty easy to get working and makes your text look way cool if you get a nice font :)

1) Create a folder on the server (in my case it was /fonts) and put the .ttf file in there.

2)

//Instead of this
//ImageString(resource image, int font, int x, int y, string s, int col);
//Ex:
ImageString($img, 1, 230, 60, 'Text', $white);

//You need to do this
//ImageTTFText(resource image, int size, int angle, int x, int y, int color, string fontfile, string text);
//Ex:
ImageTTFText($img, 10, 0, 210, 65, $white, 'PATH/TO/FONT/FILE.ttf', 'Text');


As you can see it's really not that hard, but it took me forever and a day to figure out how to do this, and it really improves the look of your text :D Have fun!

Can I ask why this was moved? It has nothing to do with Hacking vBulletin, only to do with PHP related topics. :confused:

it belongs to hins and tips, and therefore you can find it here more easyly than where it was before :)

Well, ok guess that works :)

What does this do?










privacy (GDPR)