I need to re write this filter so it will follow a text layer fill path. This way it will make the stitches along a user created path.
Ofnuts already has written a script in Python to do this. His Path Decorations filters.
Anywho this is how i fake the effect with my script.
What i do is create 2 layers
1) for horizontal values
1) for vertical values
Then i paint lines (colored or not), on each layer according to their direction.
ie all vertical lines painted go in the "horizontal value" layer, and all horizontally painted lines go on the "vertical values" layer.
This way when i run the script on either i set the values in the script dialog accordingly for each layer name. This gives more of a sewed directional look. Other wise a horizontal stitch on the top of for instance the letter R looks too long.
If i paint that top line of the R on a separate layer and run the script with vertical values it will look much better.
The image above XCF workspace file is attached for a better understanding of what i mean.