{"id":3509,"date":"2020-08-19T18:45:46","date_gmt":"2020-08-19T13:15:46","guid":{"rendered":"https:\/\/www.suramya.com\/blog\/?p=3509"},"modified":"2022-06-16T15:19:05","modified_gmt":"2022-06-16T09:49:05","slug":"convert-typed-text-to-realistic-handwriting","status":"publish","type":"post","link":"https:\/\/www.suramya.com\/blog\/2020\/08\/convert-typed-text-to-realistic-handwriting\/","title":{"rendered":"Convert typed text to realistic handwriting"},"content":{"rendered":"<p>There are some tools or projects that really don&#8217;t make any practical sense but are a lot of fun to use or just impressive in how they implement technology. The <a href=\"https:\/\/github.com\/alias-rahil\/handwritten.js\">Handwritten.js<\/a> project by &#8216;alias-rahil&#8217; 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. <\/p>\n<p>Below is a sample file with some quotes that I converted as a test :<\/p>\n<blockquote><p>* Mountain Dew and doughnuts&#8230; because breakfast is the most important meal of the day<\/p>\n<p>* Some days you&#8217;re the dog; some days you&#8217;re the hydrant.<\/p>\n<p>* He who smiles in a crisis has found someone to blame.<\/p>\n<p>* Marriage is one of the chief causes of divorce<\/p>\n<p>* Earth is 98% full&#8230;please delete anyone you can. <\/p>\n<p>* I came, I saw, I decided to order take out.<\/p>\n<p>* F U CN RD THS U CNT SPL WRTH A DM!<\/p>\n<p>* Work hard for eight hours a day, and eventually you may become a<br \/>\n  boss and be able to work twelve.<\/p>\n<p>* Quitters never win, and winners never quit, but those who never quit AND never win are idiots.<\/p>\n<p>* What&#8217;s the difference between a bad golfer and a bad skydiver?<\/p>\n<p>  A bad golfer goes, WHACK! &#8220;Damn.&#8221;<br \/>\n  A bad skydiver goes, &#8220;Damn.&#8221; WHACK!<\/p>\n<p>* Beware of the light at the end of the tunnel.  It could be an oncoming train.<\/p>\n<p>* A girl is like a road. The more curves she has the more dangerous she is!<\/p>\n<p>* A woman who dresses to kill probably cooks the same.\n<\/p><\/blockquote>\n<p>The script is fast and didn&#8217;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:<\/p>\n<p><center><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"588\" src=\"https:\/\/www.suramya.com\/blog\/wp-content\/uploads\/2020\/08\/Screenshot_20200817_234813.png\" alt=\"\" class=\"alignnone size-full wp-image-3519\" srcset=\"https:\/\/www.suramya.com\/blog\/wp-content\/uploads\/2020\/08\/Screenshot_20200817_234813.png 640w, https:\/\/www.suramya.com\/blog\/wp-content\/uploads\/2020\/08\/Screenshot_20200817_234813-300x276.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\nOutput generated by Handwritten.js<\/center><\/p>\n<p>I did also try converting a word file with the software but it didn&#8217;t take the content of the file for the conversion, instead it converted the XML &#038; 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. <\/p>\n<p>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. \ud83d\ude42<\/p>\n<p>Source: <a href='https:\/\/news.ycombinator.com\/item?id=24180795'>Hacker News<\/a><\/p>\n<p>&#8211; Suramya<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are some tools or projects that really don&#8217;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 &#8216;alias-rahil&#8217; is one such project. Basically what it does is take any Plain Text document and convert it into a realistic looking [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"","activitypub_status":"","footnotes":""},"categories":[6,18,2],"tags":[],"class_list":["post-3509","post","type-post","status-publish","format-standard","hentry","category-computer-related","category-computer-software","category-techie-stuff"],"_links":{"self":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/3509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/comments?post=3509"}],"version-history":[{"count":7,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/3509\/revisions"}],"predecessor-version":[{"id":3523,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/3509\/revisions\/3523"}],"wp:attachment":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/media?parent=3509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/categories?post=3509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/tags?post=3509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}