Each letter is blurred a different amount, but the left side one is always the most
Which is exactly how you wrote the code. As a simple example what your script is doing is: start with letter A and blur it. Now append a B to get AB and then blur that. Now append C to get ABC and then blur that and so on. The letter on the right will be the least blurred.
As you said in your first post, you need to create each letter individually, blur them and then assemble them into the final image.
Instead of starting with a widthxheight canvas, start with one that is 1xheight. Then in the loop create each blurred character (using "convert"), read in the canvas again, append the two together and then overwrite this on the canvas.
The initial canvas will be created with:
Code: Select all
shell_exec("convert -size 1x{$this->height} xc:'$this->bgColor' $file");
and replace the mogrify command with a convert command that looks something like this (note that the -blur has moved after the -draw):
Code: Select all
shell_exec($opt = "convert -size {$this->width}x{$this->height} xc:'$this->bgColor' -font $font -fill '$color' -pointsize $size -draw \"text $txS,$tyP '".$text{$i}."'\" -blur $blur +repage -append $file $file");
Pete