Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Computer-generated Handwriting

Tags:

handwriting

Are there any practical libraries for generating simulated handwriting from a string of text?

This does not mean using a handwriting-like font. Rather, I'm referring to handwriting where each letters is rendered slightly differently and connected as in the normal rhythm of human handwriting.

like image 380
themirror Avatar asked Nov 04 '22 17:11

themirror


2 Answers

I've had some success using RNNLIB (original, Github fork) which uses AI neural networks.

There's a demo link on the Github readme and also at http://www.cs.toronto.edu/~graves/handwriting.html

Sample:

12345

Note that neither demo has particularly good support for numbers (mostly unreadable) and capital letters aren't as well covered as their lowercase counterparts. Sometimes the generated images can be missing letters or just trail off.

Since it's neural network based, it's likely that some of these problems are a result of or could be improved by training data.

like image 199
arcyqwerty Avatar answered Dec 18 '22 10:12

arcyqwerty


You can take a look at Muse-CGH, an open source tool for stylish Computer Generated Handwritings.

Muse can synthesize stylish English handwriting from plain texts. Its algorithm carefully connects strokes of adjacent characters to create cursive words and uses random perturbations to ensure that every character is unique in the rendering results. Moreover, it can also generate handwriting animations!

like image 28
MrVPlusOne Avatar answered Dec 18 '22 08:12

MrVPlusOne