Andrés,

Thank you for responding.

Deploy the fonts along with your scripts... that's the only way I know.
... I do so for a custom CAPTCHA script I've made.

This sounds like a good solution. I'm having a little trouble implementing it, however.

I have what I believe is a freely distributable font called "FreeSans.ttf", and I put it in a directory called "fonts" in the base directory of my site.

However, this seems not to work:

$font = 'fonts/FreeSans.ttf';
imagettftext($image, 20, 0, $x, $y, $textColour, $font, $text);

Putting a slash in front to specify starting from the base directory - '/fonts/FreeSans.ttf' - does not seem to work either.

Looking in the manual, it seemed that maybe I needed to set the font path with putenv:

$path = realpath('fonts');
putenv('GDFONTPATH=' . $path);

But this yielded no results.

Am I still getting the syntax wrong somehow?

Thank you for any advice.

--
Dave M G

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to