vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Small Tutorial on GD Library [Freetype] (https://vborg.vbsupport.ru/showthread.php?t=53265)

mr e 05-22-2003 10:00 PM

Small Tutorial on GD Library [Freetype]
 
Ok this is pretty much an addition of my previous thread about the GD Library. 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)
PHP Code:

//Instead of this
//ImageString(resource image, int font, int x, int y, string s, int col);
//Ex:
ImageString($img123060'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($img10021065$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!

mr e 05-23-2003 03:28 AM

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

Xenon 05-23-2003 10:55 AM

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

mr e 05-23-2003 04:31 PM

Well, ok guess that works :)

TheEnd 08-04-2003 02:09 AM

What does this do?


All times are GMT. The time now is 06:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01095 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete