I had to add some stuff to the plugin file to make this work with UTF-8 on my server and to make GD accept alpha layers in the PNG file. In the
create_image() function, I put:
imagealphablending($image, true); imagesavealpha($image, true); $string = mb_encode_numericentity($string, array (0x0, 0xffff, 0, 0xffff), 'UTF-8');
mb_encode_numericentity() function converts any text to entities so as to bypass the problems I got by
imagettftext() interpreting UTF-8 input as ISO-8859-1.
Also I changed the whole thing to UTF-8 without BOM (Notepad++ calls this "ANSI as UTF-8") and replaced all the nasty CR newlines with UNIX LF ones and deleted the double line breaks that somehow crept into the file when I opened it.
Other than that it seems to work now :)