Current time: 04-23-2014, 09:19 AM Hello There, Guest! (LoginRegister)

Post Reply 
Font path
05-10-2009, 12:44 PM
Post: #1
Font path
I am using a piece of PhP code that creates a dynamic image of text for user registration as spam prevention.

what is the correct font path to use if I have shared hosting account?

<?php
Header ("Content-type: image/gif");
$im = imagecreate (440, 110);
$black = ImageColorAllocate ($im, 255, 255, 255);
$white = ImageColorAllocate ($im, 76, 203, 91);
//please adjust the font path!
ImageTTFText ($im, 42, 0, 0, 50, $white, "/usr/share/fonts/truetype/msttcorefonts/parryhotter.ttf","pigflu");
ImageGif ($im);
ImageDestroy ($im);
?>
Find all posts by this user
Quote this message in a reply
05-10-2009, 03:04 PM
Post: #2
Font path
The path is right, what I can't see installed is that font... you can use other? In fact I don't see other than ttf-bitstream-vera family installed on the machine I'm. I don't know if can be installed either of if you can install on your own home dir.

Regards.

---
Somewhere, something incredible is waiting to be known.
Sagan
Visit this user's website Find all posts by this user
Quote this message in a reply
05-10-2009, 06:38 PM
Post: #3
Font path
You can create a fonts directory and upload your own.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost
Visit this user's website Find all posts by this user
Quote this message in a reply
05-11-2009, 05:34 AM
Post: #4
Font path
Thank you for the help. I thought the fonts had to be "installed" on local machine. I will use my own font directory then.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: