Suramya's Blog : Welcome to my crazy life…

August 19, 2020

Convert typed text to realistic handwriting

Filed under: Computer Related,Computer Software,Tech Related — Suramya @ 6:45 PM

There are some tools or projects that really don’t make any practical sense but are a lot of fun to use or just impressive in how they implement technology. The Handwritten.js project by ‘alias-rahil’ is one such project. Basically what it does is take any Plain Text document and convert it into a realistic looking handwritten page. I tried it out on a few sample documents (logs) and it worked great. The programs does coredump if you try converting a 5MB file, but other than that it worked as expected.

Below is a sample file with some quotes that I converted as a test :

* Mountain Dew and doughnuts… because breakfast is the most important meal of the day

* Some days you’re the dog; some days you’re the hydrant.

* He who smiles in a crisis has found someone to blame.

* Marriage is one of the chief causes of divorce

* Earth is 98% full…please delete anyone you can.

* I came, I saw, I decided to order take out.

* F U CN RD THS U CNT SPL WRTH A DM!

* Work hard for eight hours a day, and eventually you may become a
boss and be able to work twelve.

* Quitters never win, and winners never quit, but those who never quit AND never win are idiots.

* What’s the difference between a bad golfer and a bad skydiver?

A bad golfer goes, WHACK! “Damn.”
A bad skydiver goes, “Damn.” WHACK!

* Beware of the light at the end of the tunnel. It could be an oncoming train.

* A girl is like a road. The more curves she has the more dangerous she is!

* A woman who dresses to kill probably cooks the same.

The script is fast and didn’t take more than a few seconds to process the file and create a PDF file with the output. The output for my test run is as below:


Output generated by Handwritten.js

I did also try converting a word file with the software but it didn’t take the content of the file for the conversion, instead it converted the XML & Code from the file. One suggestion for improvement I have is to enhance the script to support word files. It would be awesome if it could also convert any of the diagrams, tables etc to look like they were drawn by hand.

Maybe if I have some time I will look into this and see how easy it is to enhance the script. But no promises as I have a ton of other things I need to take complete first. 🙂

Source: Hacker News

– Suramya

2 Comments »

  1. Damm! Certainly didn’t expect to find this.

    Suggestions are noted. Will make tweaks to take word files as input. As for the diagrams, I am at a loss. Can’t think of any way to implement it without machine learning xD

    Comment by alias-rahil — August 30, 2020 @ 9:51 AM

  2. Hey Rahil,

    Thanks for taking my suggestion about the Word file. 🙂 for the diagrams there are existing projects/code that we could either run as an external module/program from Handwritten, or incorporate the code into it directly.

    A short search turned up the following link which looks promising: https://stackoverflow.com/questions/9826273/photo-image-to-sketch-algorithm though I haven’t tried it out. If I find something promising I will reach out.

    – Suramya

    Comment by Suramya — September 2, 2020 @ 3:07 PM

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress