Page 1 of 1

[SOLVED] - imagettftext not displaying on Linux Server

Posted: Tue May 31, 2005 4:35 am
by anjanesh
I have imagettftext working on my PC with Win XP, Apache, PHP 5.0.3 but its not working on my Linux server PHP 4.3.10, GD version : 2.0 or higher and FreeType Support Enabled.

Code: Select all

$Font_File   = "../fonts/LSANS.TTF";
@imagettftext($Image, $Size, $Angle, $x, $y,$Colour,$Font_File, $Char);
Image does not get displayed.

Anyone knows why it doesnt in Linux ?

I tried with comic.ttf but no change.
Thanks

Posted: Tue May 31, 2005 4:44 am
by wwwapu
Are you sure the font name is LSANS.TTF and not Lsans.TTF?

Posted: Tue May 31, 2005 4:48 am
by anjanesh
Yes - I checked upper and lower cases - comic.ttf is in lower case.

<b>Warning</b>: imagettftext(): Could not find/open font in <b>/xxx/xxx.php</b> on line <b>nn</b><br />

Tried even giving full path name - still error. Yet if I put the full pathname in the browser's url, it'll download it.

Posted: Tue May 31, 2005 5:05 am
by anjanesh
Relative path problem.
Worked when I gave $Font_File = "fonts/LSANS.TTF";
the script that had this line was included in a script in the upper directory.

Yet all this time this was working in Windows !