何度もすみません、WindowsでGD2を使い場合
TrueTypeフォントというのはパソコンを買ったときからC:\WINDOWS\fontsにたくさん入っているんですけど
このフォントディレクトリを指定したいのですがエラーがでて困り果ててます。
putenv('GDFONTPATH=' . realpath('C:\WINDOWS\fonts'));
っって記述はフォントへのディレクトリを指定しているつもりですが間違ってましたらご教授願います。

ソースはこれです
<?php
header("Content-type: image/png");
putenv('GDFONTPATH=' . realpath('C:\WINDOWS\fonts'));
$text = 'test'';
$font = 'arial.ttf';

$im = imagecreatetruecolor(400, 30);
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
imagepng($im);
imagedestroy($im);
?>