Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Font problem with imagettftext
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Font problem with imagettftext
Font problem with imagettftext
04-05-2010 11:29 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I'm trying to create a Captcha image, but am having trouble getting it working on the PlusNet servers (it works fine on my IIS5 server).
I get the error:
Warning: imagettftext() [function.imagettftext]: Could not find/open font in <path>/Captcha.php
The offending line is:
imagettftext($image,$font_size,0,$x,$y,$text_colour,"font.ttf",$code);
and "font.ttf" is a file in the same folder as Captcha.php.
I've even set the attributes of font.ttf to 755. Still no luck.
Is the GD looking at my folder or a generic folder?
I get the error:
Warning: imagettftext() [function.imagettftext]: Could not find/open font in <path>/Captcha.php
The offending line is:
imagettftext($image,$font_size,0,$x,$y,$text_colour,"font.ttf",$code);
and "font.ttf" is a file in the same folder as Captcha.php.
I've even set the attributes of font.ttf to 755. Still no luck.
Is the GD looking at my folder or a generic folder?
Message 1 of 3
(1,299 Views)
2 REPLIES 2
Re: Font problem with imagettftext
04-05-2010 11:55 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
See the note on fontfile at http://php.net/manual/en/function.imagettftext.php
Or could use something like <a href="http://community.plus.net/forum/index.php/topic,84946.msg701631.html#msg701631">this</a>.
We have GD, but not the font library... yet.
Gabe
Or could use something like <a href="http://community.plus.net/forum/index.php/topic,84946.msg701631.html#msg701631">this</a>.
We have GD, but not the font library... yet.
Gabe
Message 2 of 3
(588 Views)
Re: Font problem with imagettftext
04-05-2010 12:45 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Cheers - that did the trick.
i.e. putting the full path of the font file, instead of just the font file name.
Gerald.
i.e. putting the full path of the font file, instead of just the font file name.
Gerald.
Message 3 of 3
(588 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Font problem with imagettftext