Hi
I tried to make a version (string2png) with letterspacing and wordspacing but with some fonts it didn't look nicely.
http://modxcms.com/forums/index.php/topic,30640.new/topicseen.htmlString2png can also do real alpha transparency. Now I ported this alpha-transparency-feature back to WriteWord. Hope it works for you and you like it

Here is the code.
<?php
//////////////////////////////////////////////////////////////////////////////////////////////////
//
// Snippet Name: WriteWord
// Short Description: This snippet allows to generate image from the text with any font
// Version: 0.25 ALPHA
// Author: Metaller
// Translator: Igor
//
//////////////////////////////////////////////////////////////////////////////////////////////////
if (!isset($file)) return "Font file is not entered!";
(isset($text)) ? $text : $text = "Text string is empty!";
(isset($text_angle)) ? $text_angle : $text_angle = 0;
(isset($text_size)) ? $text_size : $text_size = 14;
(isset($text_color)) ? $text_color : $text_color = "#000000";
(isset($bg_color)) ? $bg_color : $bg_color = "#FFFFFF";
$scale = ($scale == TRUE) ? TRUE : FALSE;
$format = strtolower($format);
$format = ($format == "png") ? "png" : "jpg";
$transparent = ($transparent == TRUE) ? TRUE : FALSE;
(isset($quality)) ? $quality : $quality = 70;
$ww_template = $tpl ? $modx->getChunk($tpl): "<img src='[+ww.fileurl+]' width='[+ww.width+]' height='[+ww.height+]' border='0' title='[+ww.text+]'>";
if (substr($text_color, 0,1) == "#") $text_color = substr($text_color, 1,6);
if (substr($bg_color, 0,1) == "#") $bg_color = substr($bg_color, 1,6);
$result = compact("file", "text", "text_angle", "text_size", "text_color", "bg_color", "scale", "format", "transparent", "quality");
foreach ($result as $k=>$v)
{
$res[] = $k."=".$v;
}
$qry = implode("&", $res);
$code = md5($qry);
$filename=$modx->config['base_path']."assets/cache/{$code}.pageCache.{$format}";
$fileurl = $modx->config['base_url']."assets/cache/{$code}.pageCache.{$format}";
if (file_exists($filename))
{
$size = getimagesize($filename);
$im_width = $size[0];
$im_height = $size[1];
$ww_template = str_replace('[+ww.width+]', $im_width, $ww_template);
$ww_template = str_replace('[+ww.height+]', $im_height, $ww_template);
$ww_template = str_replace('[+ww.fileurl+]', $fileurl, $ww_template);
$ww_template = str_replace('[+ww.text+]', $text, $ww_template);
return $ww_template;
}
if ($modx->config['modx_charset']!="UTF-8") $text = mb_convert_encoding($text, "UTF-8", $modx->config['modx_charset']);
if (!extension_loaded('gd')) {
if (strtoupper(substr(PHP_OS, 0,3) == 'WIN')) {
@dl('php_gd2.dll');
}
else {
@dl('gd2.so');
}
}
$fontstmp= $modx->config['base_path']."assets/".$file;
$text_font = sprintf("%s",$fontstmp);
$box = imagettfbbox ( $text_size, $text_angle, $text_font, $text);
$text_width = $box[2]-$box[0];
$text_height= $box[5]-$box[3];
if ($scale)
{
$text_size = round((20 * $im_width)/$text_width);
$box = imagettfbbox ( $text_size, $text_angle, $text_font, $text);
$text_width = $box[2]-$box[0];
$text_height= $box[5]-$box[3];
$text_x = ($im_width - $text_width)/2;
$text_y = ($im_height - $text_height)/2;
}else{
$im_width = (isset($im_width)) ? $im_width : abs($text_width);
$im_height = (isset($im_height)) ? $im_height : abs($text_height);
$text_x = -$box[6]-1;
$text_y = -$box[7]-1;
}
if($transparent){
$im_text = imageCreateTrueColor ($im_width, $im_height);
imageSaveAlpha($im_text, true);
imageAlphaBlending($im_text, false);
$tlo = imagecolorallocatealpha($im_text, 220, 220, 220, 127);
imagefill($im_text, 0, 0, $tlo);
}else{
$im_text = imagecreate ($im_width, $im_height);
}
$bg_r = hexdec(substr($bg_color, 0,2));
$bg_g = hexdec(substr($bg_color, 2,2));
$bg_b = hexdec(substr($bg_color, 4,2));
$bgcolor = imagecolorallocate ($im_text, $bg_r, $bg_g, $bg_b);
$text_r = hexdec(substr($text_color, 0,2));
$text_g = hexdec(substr($text_color, 2,2));
$text_b = hexdec(substr($text_color, 4,2));
$textcolor = imagecolorallocate ($im_text, $text_r, $text_g, $text_b);
imagettftext ( $im_text,
$text_size,
$text_angle,
$text_x,
$text_y,
$textcolor,
$text_font,
$text);
if ($transparent) imagecolortransparent($im_text, $bgcolor);
if ($format == "png")
{
if (!file_exists($modx->config['base_path']."assets/cache/{$code}.pageCache.{$format}")) imagepng($im_text, $modx->config['base_path']."assets/cache/{$code}.pageCache.{$format}");
}
else
{
if (!file_exists($modx->config['base_path']."assets/cache/{$code}.pageCache.{$format}")) imagejpeg($im_text, $modx->config['base_path']."assets/cache/{$code}.pageCache.{$format}",$quality);
}
imagedestroy($im_text);
if ($modx->config['modx_charset']!="UTF-8") $text = mb_convert_encoding($text, $modx->config['modx_charset'], "UTF-8");
$ww_template = str_replace('[+ww.width+]', $im_width, $ww_template);
$ww_template = str_replace('[+ww.height+]', $im_height, $ww_template);
$ww_template = str_replace('[+ww.fileurl+]', $fileurl, $ww_template);
$ww_template = str_replace('[+ww.text+]', $text, $ww_template);
return $ww_template;
?>