handwriting-synthesis icon indicating copy to clipboard operation
handwriting-synthesis copied to clipboard

How to align the text to the left?

Open supersonic71 opened this issue 4 years ago • 4 comments

Output is aligned to the center, how do I align it to the left?
Thanks

supersonic71 avatar Oct 10 '20 15:10 supersonic71

did you find a solution??

shaikhalid avatar Nov 29 '20 11:11 shaikhalid

@shaikhalid yes

Comment out this line in demo.py : strokes[:, 0] += (view_width - strokes[:, 0].max()) / 2

supersonic71 avatar Nov 29 '20 13:11 supersonic71

@shaikhalid @supersonic71

This will vary the left start position so it's more natural.

strokes[:, 0] += (view_width + random.randint(-15, 15) - strokes[:, 0].min())

chavenor avatar Nov 27 '22 21:11 chavenor

@shaikhalid @supersonic71

This will vary the left start position so it's more natural.

strokes[:, 0] += (view_width + random.randint(-15, 15) - strokes[:, 0].min())

For me it works better when I replace it with

strokes[:, 0] += (random.randint(0, 30) - strokes[:, 0].min())

hexfactor avatar Apr 17 '23 12:04 hexfactor