Hi,
I've started to install this mod, but I thought I should first check with the code provided, if it'll work.
<?php
header ("Content-type: image/png");
$im = imagecreate (180, 30);
$black = imagecolorallocate ($im, 0, 0, 0);
$white = imagecolorallocate ($im, 255, 255, 255);
imagettftext ($im, 14, 0, 10, 21, $white, "/home/public_html/arial.ttf", "GD Freetype test");
imagepng ($im);
imagedestroy ($im);
?>
Well, the little code, doesn't work. I get a black box, but no white text.
I used both absolute and relative link to the font, but still nothing..
This is the server report:
gd
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
Do I require anything else to make this work?
TIA!
Mat
EDIT: Problem fixed. It was in the path. I wish it would be explained better. You need a FULL server path, like /home/www/users/quantas/domain/www/multimedija/font.ttf.. not just ../font/font.ttf or
www.domain.com/fonts/font.ttf.
I got the test script working now, now for the whole mod.. fingers crossed..