That's exactly what I was going to say - the "hand drawn" diagram on the right is better looking, but the left hand is far more accessible and arguably have more utility.
MyScript offers an API that does this. You need to feed it all the motions/sequence of points that make up the shape (known as "online OCR"), it won't work with a static document.