Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include path for fonts in GD?

Status
Not open for further replies.

MasterKaos

Programmer
Jan 17, 2004
107
GB
Hi i've recently changed hosting providers. Previsouly i was able to use GD TTF functions such as imagettftext() by simply putting the fontfile (for example arial.ttf) in the same directory as the script, then just using "arial.ttf" as the fontfile argument in the the imagettftext() function.

This no longer works with my new provider. Although php is configured with GD and freetype, it can't find the font file. I have tried manually setting the include path using
Code:
ini_set("include_path", "/home/username/public_html");
but that doesn't seem to work.

Also, in phpinfo() the config options show:
Code:
'--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf'

If i got my hosting providers to change the freetype-dir would that solve my problem?

----------------------------------------------------------------------------
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top