0

What other server-side tools are out there for creating textual images from TTF/OTF font files? I can't get imagettftext() to render Chinese/Japanese glyphs (even when defining the input string using HTML entities such as $#44032; as suggested here: PHP function imagettftext() and unicode).

Community
  • 1
  • 1
David Jones
  • 10,117
  • 28
  • 91
  • 139

1 Answers1

0

I ended up invoking ImageMagick from within PHP:

$command = 'printf "'.$text.'" | convert -size x'.(5*$size).' -gravity center -background "#00000000" -fill "#000000FF" -font '.$fontpath.' -pointsize '.$size.' label:@- -trim '.$imagepath;
exec($command);
David Jones
  • 10,117
  • 28
  • 91
  • 139