I am trying to learn php. Was doing just find until I tried to use imagecreatefrompng.
Specs: Running on W2K with 256k memory. Apache/PHP/mySQL
Code:
$fontfile="http://nest/public/kazaam/Arial.ttf";
do
{
$font_size--;
$bbox=imagettfbbox ($font_size, 0, $fontfile, $button_text);
I get the following error on the last line of code.
Warning: Could not find/open font in c:\phpdev\www\public\kazaam\make_button.php on line 32
Help with imagecreatefrompng
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Try changing
to
and make sure you have got a copy of Arial.ttf in your kazaam folder.
Mac
Code: Select all
$fontfile = 'http://nest/public/kazaam/Arial.ttf';Code: Select all
$fontfile = 'Arial.ttf';Mac
Made the change you suggested; with the same results.
$fontfile = "arial.ttf";
Still get the same results[/url]
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Yes. I have even tried moving it to another subdirectory, name fonts.
I have tried every combination I can think of. Even looked at some "Classes" to see if I had missed something. As a Newbie I can't say this is the first instruction I have had problems with, however it is the first that for the life of me, I can't make work.
I have tried every combination I can think of. Even looked at some "Classes" to see if I had missed something. As a Newbie I can't say this is the first instruction I have had problems with, however it is the first that for the life of me, I can't make work.