Finally I had to recompile PHP with --enable-gd-jis-conv.
However the text display is wrong, in Japanese.
$text = '夏の天気';
$fontfile = '/usr/share/fonts/japanese/TrueType/sazanami-mincho.ttf';
return imagettftext ($image, $size, $angle, $x, $y, $color, $fontfile, $text);
But different kanji (Japanese characters) are displayed instead (very different, looks like Chinese).
Could it be an encoding issue?
Using PHP 5.3.3 on RHEL 5.4.
I had to run this to get it to work