Fonts path for PHP script?

ian27

It all started at 3......
Hello,

I'm trying to create a script that will allow me to produce buttons on-the-fly from information giving in an html form using a PHP script. The problem is that the script I have gives the path to the fonts library on a window system.

putenv('GDFONTPATH=C:\WINNT\Fonts');

What should the path be to the fonts folder on a mac based system? I'm using OS 10.2.8.

Thanks.

Ian
 
3mors said:
I think the path should be:

putenv('GDFONTPATH=/Library/Fonts');

Thanks for the prompt reply. I tried this but no joy unfortunately. I'm going to go through the script with a fine tooth comb to try to work out where I might be going wrong. I'll keep you posted.

Ian
 
Ah-ha, fixed it! PHP automatically looks for a font that is in your current directory by default. Therefore by placing the TrueType font into a folder of the directory that you're using and adding a relative path to it that way works fine.

I'm still not sure how I would locate a file outside of the directory though, but it is working now.

Ian
 
Back
Top