Hello people,
finally I FOUND the solution for TFF fonts :
the problem is path to font when path contains long file names like Program Files\Apache group\Apache.....
I wrote a litle finction to convert long file names into short(8.3) and now GD(TTF) works just fine!!
ok, good luck!!
function convert16($s)
{
if (strlen($s) > 8)
{
$p = pathinfo($s);
$ss = substr(str_replace('.','',$s),0,6);
$s = $ss.'~1';
if($p['extension']) $s .= '.'.$p['extension'];
}
return $s;
}
function convertpath($path)
{
if(is_file($path))
{
$pathinfo = pathinfo($path);
}
elseif(is_dir($path))
{
$pathinfo['dirname'] = $path;
$pathinfo['basename'] = '';
$pathinfo['extension'] = '';
}
else return $path;
$dirname = split("/",$pathinfo['dirname']);
$res = '';
foreach ($dirname as $dir)
{
if($dir == '') continue;
$res .= convert16($dir).'\\';
}
return $res.$pathinfo['basename'];
}