[HN Gopher] Realistic computer-generated handwriting
       ___________________________________________________________________
        
       Realistic computer-generated handwriting
        
       Author : carl_dr
       Score  : 697 points
       Date   : 2023-01-26 10:32 UTC (12 hours ago)
        
 (HTM) web link (www.calligrapher.ai)
 (TXT) w3m dump (www.calligrapher.ai)
        
       | utsuro wrote:
       | Interesting, but has relatively low character limit.
       | 
       | Can't even fit the "Tears in Rain" soliloquy from Blade Runner :/
        
       | aksgula22 wrote:
       | nice, can we add some girl handwriting next
        
       | gobdovan wrote:
       | This would have been so awesome to have something like this in my
       | high school years in Eastern Europe, where teachers ask for you
       | to write essays by hand instead of typing them. The font is
       | similar to my handwriting, but fails on letters with accents.
        
       | mlindner wrote:
       | For something called calligrapher I would have expected it to be
       | able to do Japanese, but it just produces unreadable garbage when
       | non-English is used.
        
       | eruci wrote:
       | Beautiful! Now if one can make this generate random handwriting
       | styles, and save these styles for future use I'm set!
        
       | urbandw311er wrote:
       | This is perfect for those ransom letters I send out. I no longer
       | need to search around for newspapers and am going to save a
       | fortune on sticky tape!
        
         | credit_guy wrote:
         | So now I just need to go ask this startup to see their logs.
         | I'll get your IP address in no time. Maybe I'll need a warrant.
         | But I'm sure these guys will just be very nice and send me
         | their logs on an ongoing basis.
        
           | creata wrote:
           | Fortunately, it works without an Internet connection!
        
           | Gare wrote:
           | Bad (or good) news, it's open source:
           | https://github.com/sjvasquez/handwriting-synthesis
        
         | criddell wrote:
         | Just don't print it at home! Your printer is probably a snitch.
        
           | est wrote:
           | Or you can buy a plotter.
        
       | fallingmeat wrote:
       | oh it's nondeterministic! yeah this is fun
        
       | sublinear wrote:
       | I think the legibility slider can go quite a bit lower. None of
       | the models are anywhere close to real world illegibility.
        
         | RobotToaster wrote:
         | Needs a "doctor" mode.
        
           | pjmlp wrote:
           | Isn't it interesting that regardless of the culture, every
           | nation seems to have "doctor" mode writing?
           | 
           | I wonder how it comes to be.
        
             | andyjohnson0 wrote:
             | I suspect its less to do with actual, objective legibility
             | and more to do with patient anxiety. The things that
             | doctors (and pharmacists, etc) hand-write tend to be
             | personally important.
        
         | gpderetta wrote:
         | I was going to comment the same thing, but style 6 at min
         | legibility is almost as bad as my handwriting.
        
         | FailMore wrote:
         | I agree too
        
       | nirav72 wrote:
       | A piece of code that can write cursively better than I ever could
       | and l am from a generation where they forced us to learn cursive
       | writing.
        
       | wolframhempel wrote:
       | Should it worry me that the legibility slider cranked all the way
       | to zero is still more legible than my actual handwriting?
        
         | smokeyfish wrote:
         | Are you a doctor?
        
           | wolframhempel wrote:
           | to my parents' major disappointment - no :-(
        
             | [deleted]
        
             | atonse wrote:
             | I first read that as "to my patients' major disappointment,
             | no" and chuckled :-)
        
         | kris_wayton wrote:
         | I always wondered if pharmacists had any specific training in
         | the terrible handwriting doctors put on prescriptions, or if
         | they all just figure it out in their first year.
        
           | traceroute66 wrote:
           | > I always wondered if pharmacists had any specific training
           | in the terrible handwriting doctors put on prescriptions
           | 
           | One day my local pharmacist was in a chatty mood whilst
           | filling my request and one topic that came up was doctor's
           | handwriting.
           | 
           | The answer is yes, they do (did ?) receive training in
           | handwriting recognition.
           | 
           | Basically it involves learning to recognise common
           | abbreviations and mostly being very familiar with drug names
           | and dosing.
           | 
           | As the pharmacist said, when he received his training it was
           | "easy" because the formulary was "somewhat shorter" than it
           | is today. As a result he said his junior trainees struggle
           | and frequently come to him guidance until they've had
           | sufficient exposure.
           | 
           | However with things moving to electronic prescriptions the
           | days of deciphering will be relic of the past for many
           | pharmacists.
        
             | themodelplumber wrote:
             | This reminded me, I once attended a lecture by a pharmacist
             | who got interested in handwriting and showed how different
             | conditions and medications might manifest in customers'
             | handwriting.
             | 
             | Looking at the samples, it was pretty fascinating.
             | 
             | Since he undoubtedly read a lot of doctors' writing too,
             | and since I personally know a doctor who abused their
             | access to medication, I did wonder what questions this
             | pharmacist would've had about local doctors...
        
               | a9h74j wrote:
               | Although correlated, I'm less worried about the doctors
               | than all the prescription errors which were said to kill
               | many people.
        
         | ant6n wrote:
         | Just let the computer do the handwriting and you'll be fine.
        
         | icepat wrote:
         | For accuracy, it needs negative legibility settings. Anyone
         | who's been in a sprint retro with hand written action points
         | knows this.
        
       | soperj wrote:
       | I expected actual calligraphy from calligrapher.ai :|
        
       | mortenjorck wrote:
       | I wonder if it would be possible to "bake" some of the logic and
       | patterns that emerge from this into a font using more advanced
       | OpenType features.
        
       | tincholio wrote:
       | Well, calligraphy, it is not... Decent handwriting, though.
        
       | dom96 wrote:
       | I'd really love to read about how this was put together. Does
       | anyone have any ideas about the high-level steps?
        
       | a9h74j wrote:
       | Trick: "Dear teacher, Johnny was sick yesterday and could not
       | attend school. Sincerly, Johnny's mom."
       | 
       | Anti-trick: Soon the teachers themselves will not be able to read
       | cursive (or perhaps, recognize the spelling error).
        
       | 60fps wrote:
       | nice thread and a perfect way to introduce myself, so with that
       | being said; this is my very first post -
       | https://imgur.com/a/nGK2wB4
        
       | msoad wrote:
       | Struggles with "special" latin characters like U, ae, i etc
        
       | albert_e wrote:
       | This is excellent. Can someone knowledgeable weigh in on what it
       | would take to make an API out of something like this so one could
       | say integrate this into a document/image/presentation generator.
       | Or for a simpler usecae - personalized greeting card generator.
        
       | drKarl wrote:
       | It reminds me of Turry...
        
       | kolinko wrote:
       | Awesome, but fails with accents etc.
       | 
       | A case for polish: ,,Zazolc gesla jazn" - fails in many gunny
       | ways.
       | 
       | I also tried emojis - of course it failed, but now I'm super
       | curious how would hand written emojis look like :D
        
         | pndy wrote:
         | > A case for polish
         | 
         | I run it few times and some in some variants algorithm just
         | gives up and produces some _noodles_ similar to  "szlaczki" -
         | the patterns kids train before starting hand writing.
         | Definitely the issue of diacritical mark presence - maybe the
         | input should pick the closest "clean" Latin letter before
         | algorithm becomes aware of accents?
        
         | pjmlp wrote:
         | Same with languages like Portuguese and French, it did not got
         | any of them right.
        
         | AnIdiotOnTheNet wrote:
         | It would probably look a lot like handwritten kanji.
         | 
         | Asking various stable diffusion implementations, it looks like
         | it agrees with me at least a little. When anything close to
         | what I want is generated it tends to actually contain kanji
         | like fire and life.
        
         | layer8 wrote:
         | Even ASCII characters like $&@ don't work.
        
       | gobdovan wrote:
       | This would have been so awesome to have in my Eastern European
       | high school, where you're required to write essays by hand
       | instead of typing them. The font it generates is similar to my
       | handwriting but fails hard on accented letters though.
        
       | dukeofdoom wrote:
       | To make it more useful for video overlays:
       | 
       | 1. Add a way to set the background color, and / or all the
       | background to be transparent.
       | 
       | 2. Add a way to download the animation of the writing as a movie
       | clip
        
       | joshspankit wrote:
       | Come to think of it, handwriting is one of the most perfect uses
       | for "what's connected to what" AI.
       | 
       | Love this
        
       | SMAAART wrote:
       | When you write in all caps there are some extra | added here and
       | there
       | 
       | https://i.imgur.com/HZHlDFs.png
       | 
       | https://i.imgur.com/xF0pV6I.png
        
       | 0027 wrote:
       | This produces some really wonky numbers. "$800+$27.321 =
       | $827.321" is more or less indecipherable
        
       | GuB-42 wrote:
       | For fun: max speed, max legibility, style 2, sentence "My first
       | name is: bla bla bla bla bla bla bla bla", stroke width doesn't
       | matter.
       | 
       | It may take a few tries but at some point, you may get some weird
       | results (about 1/4 time for me). It may happen with other
       | settings, but these work well for me.
        
         | v8xi wrote:
         | I went minimum speed, max legibility of "A quick brown fox
         | jumps over the lazy dog" and it gives me "A quick brown
         | foxeeeeeeeeeeeeeeejumps..."
        
         | mach1ne wrote:
         | Any idea what causes this?
        
           | peaslock wrote:
           | Neural nets often fail with (repetitive) gibberish output
           | when the input is too different from the training data. This
           | model appears to take in the entire text input at once or
           | look ahead at the next input letters, so the unusual "bla
           | bla" at the end can mess up outputs near the beginning.
        
             | GuB-42 wrote:
             | The "bla bla" actually doesn't do much, that's the "My
             | first" that triggers it most of the time. I only added the
             | "bla bla" in the end to make the line longer because it
             | looks better that way, but just writing "My first" or even
             | "My f" is enough.
             | 
             | It is described as "Realistic handwriting generator.
             | Convert text to handwriting using an in-browser recurrent
             | neural network", so, unlike GPT, it is not a transformer
             | and it is small, so it most likely doesn't take the entire
             | text input as once. Most likely, it simply overshoots the
             | previous stroke and decides that a loop is the most
             | appropriate way to continue, then it overshoots that loop,
             | and again, and again, until by chance it stops overshooting
             | and proceeds to the rest of the text. Cursive style like
             | #2, the need for precise strokes (high legibility) and
             | specific letter transitions seem to exacerbate the problem.
        
         | shaicoleman wrote:
         | Example screenshot:
         | 
         | https://snipboard.io/mxF8O0.jpg
        
           | andai wrote:
           | I got an even longer one! https://i.imgur.com/SvxL9IE.png
        
             | Jorengarenar wrote:
             | https://imgur.com/a/XXJeWBr
        
             | [deleted]
        
           | mawise wrote:
           | I had a similar experience, haven't been able to reproduce it
           | too consistently:
           | 
           | https://snipboard.io/0j7CrT.jpg
        
           | jdshupe wrote:
           | I had it do this on the word "lazy". Just filled the screen
           | with loops.
        
             | blueblob wrote:
             | The quick brown fox jumps over the lazy dog
        
         | hooande wrote:
         | lol it's me signing a credit card reader
        
       | kibwen wrote:
       | I think a lot about how the written English language has been
       | altered by technology. Latin majuscule letterforms were designed,
       | AFAICT, to be easy to chisel into stone. Miniscule letterforms
       | were later invented because they were faster to write, enabling
       | monks to copy manuscripts more quickly. Printing press
       | manufacturers saved money by getting rid of letters that could be
       | replaced by combining others (the thorn), alternative letterforms
       | (long S), and rejecting ligatures. Later, both
       | typewriters/teletypes and low-resolution early computer displays
       | would force English letterforms to be further simplified.
       | 
       | To tell the truth, mostly I'm just envious of all the beautiful
       | calligraphic scripts that are standard in other languages,
       | whereas with English it seems we're stuck with sterile Helvetica
       | clones. Maybe someday we can re-beautify everyday English.
        
         | [deleted]
        
         | bradrn wrote:
         | It gets even more intricate! Until the 15th century or so,
         | there were dozens of different styles of Latin script optimised
         | for slightly different writing technologies [0], some so
         | different to what we've now converged on that I hesitate to
         | call them the same script. Our current handwritten lowercase
         | letters developed around fountain pens and quills -- something
         | I realised when I started using fountain pens and realised that
         | lowercase writing suddenly became much more natural. On the
         | other hand, our printed lowercase letters have changed little
         | since Charlemagne standardised his miniscule script for maximum
         | legibility with a broad-edged nib. Meanwhile, in Germany,
         | blackletter styles developed for fast writing with the same
         | nib; this eventually ended up as Sutterlin [1], which looks
         | quite different to the script we're currently using. In England
         | blackletter developed into 'secretary hand' instead [2], which
         | again looks quite different. And of course there's more! [0] is
         | the best overview I've found.
         | 
         | (Thinking about this I do often wonder what a form of
         | handwriting optimised for the ballpoint pen would look like...
         | probably quite different to our current handwriting styles!)
         | 
         | [0]
         | https://web.archive.org/web/20100403062849/http://guindo.pnt...
         | 
         | [1] https://en.wikipedia.org/wiki/S%C3%BCtterlin
         | 
         | [2] https://en.wikipedia.org/wiki/Secretary_hand
        
       | 29athrowaway wrote:
       | You may want to experiment making characters slightly larger or
       | smaller, and making some characters slightly more spaced than
       | others.
        
       | wistlo wrote:
       | Handwriting simulator, yes.
       | 
       | Calligraphy? Not quite. I'll still be paying someone to address
       | my daughter's wedding invitations, I expect.
       | 
       | Unless she elopes, that is (one can hope).
        
       | Zopieux wrote:
       | ... and of course it only supports a-z0-9 and probably one or two
       | punctation characters. The ML diversity problem applied to
       | language/script :-(
        
       | theappsecguy wrote:
       | This is awesome! Would be nice to be able to change colour
        
         | spuz wrote:
         | You can actually download the output as an SVG which will allow
         | you to change the colour as you wish.
        
       | intrasight wrote:
       | I just see "Loading..."
       | 
       | Anyway, was curious if this was going to re-creating my
       | handwriting based upon my providing some samples.
        
       | injidup wrote:
       | So strange. It's failure modes are kind of random
       | 
       | black farts - just generates squiggles 90% of the time
       | https://i.imgur.com/znk9lj5.png
       | 
       | red farts - works all the time https://i.imgur.com/KeL5DtF.png
       | 
       | brown farts - works all the time https://i.imgur.com/IwwgQNM.png
        
       | pjmlp wrote:
       | Great, if one only writes English.
       | 
       | It messes up all diacritics.
        
       | kome wrote:
       | it can't do accents
        
       | danShumway wrote:
       | As other people have mentioned, this seems pretty limited and
       | does look like it struggles a lot with "uncommon" situations.
       | Doesn't look like it handles stuff like line wrapping either,
       | although maybe that could be a separate step.
       | 
       | Still, incredibly fun to play with, and something I could easily
       | imagine being useful at least for small projects if it was
       | generalized just a little bit more and trained on more diverse
       | datasets. Really cool project.
       | 
       | I really like that you can play with speed using (roughly) the
       | same style/legibility settings; it would be interesting to be
       | able to simulate handwriting for a single "character" and subtly
       | convey information visually about what state of mind the person
       | was in whenever they were writing.
        
       | legoxx wrote:
       | very nice, just a small comment, this is NOT handwriting style,
       | 
       | it should look like this in my book:
       | 
       | https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS3tT5h...
        
         | ygra wrote:
         | Well, there are lots of different handwritings. Not everyone
         | writes cursive (especially in the US it seems to be very rare).
         | My own handwriting is something like a hybrid between cursive
         | and print with a few contextual ligatures thrown in.
        
       | waynesonfire wrote:
       | so cool, can i export as svg?
        
       | phonebucket wrote:
       | Alex Graves (now at DeepMind) put a similar demo on his
       | University of Toronto page a long time back:
       | https://www.cs.toronto.edu/~graves/handwriting.html
        
         | alpineidyll3 wrote:
         | Yeah. Alex is so under-appreciated in the early-modern history
         | of AI. This definitely works better than that did though.
        
       | lagrange77 wrote:
       | Really cool!
        
       | vmarius wrote:
       | Nicely done, but I think you have a bug:
       | https://imgur.com/VXJeCmx
        
         | itvision wrote:
         | Steve Ballmer intervened!
        
         | badcppdev wrote:
         | The AI seems to be simulating a different type of stroke
        
       | itvision wrote:
       | It generates different writing even if you choose the same style.
        
       | neophyt3 wrote:
       | tried this -\\_(tsu)_/- did not work well
        
       | jack_pp wrote:
       | breaks regularly on 'hi' , the "i" is usually not dotted and if
       | the 'h' is connected to the 'i' it usually doesn't read right
        
       | terpimost wrote:
       | Very nice! Big potential!
        
       | micw wrote:
       | Does not seem to be very consistent. When I generate 2 texts with
       | the same "style", it never looks like written by the same writer.
        
       | flockonus wrote:
       | Kinda funny how the AI doesn't seem to know about Kanji but
       | hallucinates some convoluted answer anyway! Try:
       | 
       | Ri Ben
       | 
       | then, the char limit:
       | 
       | Ri Ben Ri Ben  Ri Ben  Ri Ben  Ri Ben  Ri Ben  Ri Ben  Ri Ben  Ri
       | Ben  Ri Ben  Ri Ben  Ri Ben  Ri Ben  Ri Ben  Ri Ben  Ri Ben  Ri
       | Ben
        
         | tmtvl wrote:
         | Forget kanji, it doesn't know about "=".
        
       | pmarreck wrote:
       | 1) I wonder if something like this exists, but for script.
       | 
       | 2) I wonder if I can train an ML to do my handwriting.
        
       | Version467 wrote:
       | Combine this with ChatGPT and a Pen Plotter and you can offer
       | heartfelt hand-written letters as a service. (That are neither
       | handwritten, nor heartfelt, but people won't notice, or care.)
        
         | intotheabyss wrote:
         | One step closer to the movie Her
        
           | jvm___ wrote:
           | Seinfeld.
           | 
           | George gets married because of a typo into an AI handwritten
           | letter service he sent to his girlfriend.
        
             | joshspankit wrote:
             | Is this spitballing, or did that actually happen in the
             | show? My memory is v.fuzzy.
        
           | sbergot wrote:
           | In "Her" a human is composing the letters so this is one step
           | further.
        
         | criddell wrote:
         | I think all of the car dealers I've dealt with the past decade
         | are doing something like this. I get "handwritten" notes from
         | them a few times a year telling me the market is hot for my 5
         | year old Subaru and I'd be a fool not to trade it in.
         | 
         | I don't know if it's a machine writing the notes or if that's
         | what salespeople do when they aren't busy.
        
           | Shaggy2000 wrote:
           | Japanese companies, such as Honda, have a history of using
           | personal relationships and direct communication to get their
           | products off the ground, such as in the case of Mr. Honda
           | writing to thousands of dealers to ask them to stock his new
           | invention, the bike with an engine, in order to help his
           | company and the Japanese economy to recover.
        
           | rootusrootus wrote:
           | I work for a company that writes a lot of the fundamental
           | technology for car dealers. In most cases you probably are
           | getting actual handwritten notes from salespeople. They'll
           | absolutely put that minimal effort into lead generation.
        
             | ed_mercer wrote:
             | How is getting handwritten notes minimal effort?
        
             | boplicity wrote:
             | Just goes to show how little personalization matters.
             | Unless it's actually personal, it's still fake!
        
           | nirav72 wrote:
           | Most likely mass printed for targeted mailing with a
           | handwriting style font. I remember getting something similar
           | in the mail written in what appeared to be blue ink from a
           | ballpoint pen. Only to find out my wife got an identical
           | piece of ad mail , just with her name at the top.
        
             | dendrite9 wrote:
             | Last year there was a discussion about someone making a
             | setup to send handwritten plotted letters here:
             | https://news.ycombinator.com/item?id=28587458
             | 
             | I noticed some similar letters several years ago and had a
             | pretty negative response once I figured it out. But these
             | might be enough better I wouldn't notice unless of course I
             | see another one like you did.
             | 
             | https://www.audience.co/did-you-receive-a-fake-
             | handwritten-n...
        
         | anigbrowl wrote:
         | _but people won 't notice, or care._
         | 
         | Most people, yes. A few will definitely notice and care. Faking
         | this stuff is the fast way to get on my shit list, though I
         | realize I'm in a minority here. I am very pro AI in general,
         | but I am extremely anti-deception. If you send me a 'hand-
         | written note' that really wasn't, why would I trust you about
         | anything else?
        
         | cainxinth wrote:
         | Ha, it's the thought that counts!
        
       | universemaster wrote:
       | It would be great to use this for complex latex equations.
       | 
       | Often a hand-writing feel makes youtube math explainers and
       | lectures much more absorbing.
       | 
       | But, at the same time, handwriting makes videos a pain to edit to
       | correct the mistakes that all math lectures longer than a few
       | minutes inevitably have.
        
       | theden wrote:
       | "oooooooooooooooooooooooooooooo", max speed, style 6
       | 
       | https://i.imgur.com/eX4nhoA.png
        
       | guelo wrote:
       | Great tool for forging signatures.
        
       | kokojumbo wrote:
       | [flagged]
        
       | petodo wrote:
       | That's not really realistic, it can't even do normal cursive
       | handwriting with first capital letter joined, I dunno anyone who
       | writes like any of those 10 styles, maybe they are common in US,
       | but certainly not in this part of Europe.
       | 
       | Get back to me when it will knows at least something like this:
       | 
       | https://qph.cf2.quoracdn.net/main-qimg-5d1b0e1d28c12813e1255...
       | 
       | or here especially 1st and 3rd line
       | https://d50-a.sdn.cz/d_50/c_img_E_C/3VfFjd.jpeg
       | 
       | Then we can talk about REALISTIC handwriting.
        
         | zokier wrote:
         | > That's not really realistic, it can't even do normal cursive
         | handwriting
         | 
         | There is no such thing as "normal cursive". Cursive as a
         | general style is primarily defined by joined characters, which
         | this generator definitely does, in contrast to print writing
         | which has separated characters.
         | 
         | Even formal cursive writing systems vary wildly in style and
         | construction, and I'd venture a guess that vast majority of
         | people do in practice have pretty sloppy style.
        
           | petodo wrote:
           | All styles I tried have first capitalized letter separated
           | (not joined as it should be properly) and written in print
           | writing, that's not really cursive by my standards.
        
           | bmn__ wrote:
           | > There is no such thing as "normal cursive".
           | 
           | http://enwp.org/Teaching_script
           | 
           | There exist handwriting styles that have been standardised by
           | their national ministry of education or similar, and millions
           | of school children each year learn it. It is true that quite
           | soon the individual's styles diverge from the normal form.
        
         | kris_wayton wrote:
         | Realistic for me would be including small ink pools, skips,
         | smudges, crossed out corrections, and so on.
        
       | ljsocal wrote:
       | It has issues with capital letters. One at the beginning of a
       | word works correctly. Mor than one and it falls apart, i.e. III
        
         | sandos wrote:
         | Ooh, thats why I thought upper-case A was broken! Apparently
         | only when you write an all-uppercase word.
        
       | JKCalhoun wrote:
       | I'm right handed, only 6 & 7 styles looked to have a right-handed
       | slant.
       | 
       | Perhaps a slant (skew) slider would be a nice touch.
       | 
       | Also, none of the styles _stroke_ their dots (dotted  "i", etc.).
       | I know it might be derisively called "cheerleader style" (but
       | it's the way I dot my i's to give the dot more weight).
        
       | godmode2019 wrote:
       | This is a very old project glad to see it get the credit it
       | needs.
       | 
       | One interesting thing is if you show someone this for a random
       | sentence and ask them want do they think. They always say how did
       | it copy my writing. Everyone thinks it looks like their own
       | writing. Likely because its the average of all peoples writing.
       | Try it out
        
       | crazygringo wrote:
       | This is incredibly cool.
       | 
       | And it definitely feels like something the creator could (and
       | should?) make money off of.
       | 
       | Limit free usage to medium-resolution bitmaps and a subset of
       | styles, but make paid downloads available for high-resolution
       | SVG's and a wider variety of styles.
       | 
       | I can also imagine there's a market for ersatz "handwritten
       | notes" from companies that genuinely appear to be handwritten,
       | rather than using a handwriting font -- to license the software
       | itself as some kind of mail-merge plugin or something. Combine it
       | with an autopen or something, and nobody could tell the
       | difference.
        
         | anigbrowl wrote:
         | _market for ersatz "handwritten notes"_
         | 
         | Yes, this is already A Thing in marketing, though as you say it
         | currently uses fonts & printing. I hate it and am biased
         | negatively against any company that does this, because their
         | marketing materials lied o me by pretending to be a personal
         | communication, to get my attention for their mass-produced
         | marketing message.
         | 
         |  _And it definitely feels like something the creator could (and
         | should?) make money off of._
         | 
         | No way! It should be reverse-engineered and reproduced so that
         | nobody can make money by gatekeeping it. If we can automate the
         | production of handwriting, we must be able to automate the
         | production of automated handwriting generators.
        
       | airstrike wrote:
       | Man, these capital E's are ugly/lazy AF
        
       | qwerty456127 wrote:
       | Non-english alphabets unreadable even with maximum legibility
       | setting.
        
         | bmn__ wrote:
         | I have the feeling that the amount of programmers whose minimum
         | acceptable standard for code is on the level of "garbage in,
         | garbage out" is on the rise. I condemn this development, that's
         | a lack of role models who can transmit the values of culture
         | and discipline.
         | 
         | If I had written that software, I would have made an effort to
         | support the complete Latin script, or at the very least shown
         | an error or a warning for unsupported letters.
        
           | duckmysick wrote:
           | Looks like it's based on this paper [1]. It's a recurrent
           | neural network trained on online handwriting data. It means
           | you record how the position of the tip of the pen changes as
           | you write. The training data comes from the IAM On-Line
           | Handwriting Database which has only handwritten English text.
           | 
           | If you want to support a complete Latin script, you would
           | have to generate a lot of training data yourself, preferably
           | in multiple languages. Quite the effort indeed.
           | 
           | 1 - https://arxiv.org/pdf/1308.0850.pdf
        
         | [deleted]
        
         | JamesCoyne wrote:
         | Try: "This costs $2.00".
        
       | etiam wrote:
       | I had just been primed with
       | https://news.ycombinator.com/item?id=34525750 and arrived
       | expecting artistic calligraphy...
       | 
       | That's probably a lot to ask.
       | 
       | Has anybody got tips about interesting datasets in that space?
        
       | dirtybirdnj wrote:
       | This is SUPER FUCKING COOL
       | 
       | The UI is beautiful because it gets out of the way
       | 
       | The fact that you have a built in SVG export is _chefs kiss_
       | 
       | My only suggestion re the export is you should have it save as
       | .svg, on my mac / chrome it just saved as an extension-less file.
       | 
       | Is there any way it could output line paths instead of shapes? I
       | would love to be able to use this with my pen plotter but because
       | of the output it effectively does tiny traces around each letter
       | instead of natural strokes like a person does
        
         | [deleted]
        
       | xcambar wrote:
       | My first name contains one of the fewest used letters of the
       | alphabet and in first position nonetheless: Xavier
       | 
       | Let me tell you: the training data did not contain that many X to
       | begin with :D
       | 
       | The Xs at best look like Ts, at worst like malformed Os.
       | 
       | Always funny to find the blind spots of some piece of tech.
        
         | dubya wrote:
         | Try 'XXX'. Definitely too much variation with what should be
         | the same glyph. It doesn't seem to know about ampersands
         | either.
        
           | lovehashbrowns wrote:
           | 6ix9ine puts the 9 as a G and the x is all sortsa fun
           | variations. Sometimes it's a lowercase t, sometimes it's a
           | bunch of loops, and sometimes it's two disconnected slashes.
        
         | alt227 wrote:
         | This is hilarious, its like its treating an X as a wonky t !
        
         | jade-cat wrote:
         | i recommend trying the phrase "sphinx of black quartz, judge my
         | vow!" on style 6, with legibility set to maximum. sometimes it
         | looks roughly right, sometimes it opens with
         | "sphnnneoooeoeoeoeoevorneroerof black quartz"
        
           | pmarreck wrote:
           | wow! I was able to duplicate that!
           | 
           | as usual, the errors are at least as interesting as the
           | successes on new tech!
        
           | xcambar wrote:
           | Such a good catch!
        
           | dendrite9 wrote:
           | I like that phrase. On style 2 with high legibility (~75% to
           | the right), max speed, and min width I ran it a couple times
           | with good success then it looped off the screen for the next
           | few runs.
           | 
           | The same settings but with min speed got caught at the z,
           | creating what looked like repeating waves then a few letters
           | that I couldn't place from the phrase.
           | 
           | Also amusing are the loops that get the tops cropped even
           | though other letters extend higher.
        
         | shaky-carrousel wrote:
         | The training data didn't contain n, or characters with a tilde
         | :)
        
         | neogodless wrote:
         | Oh, a bunch of XXX, ZZZ, JJJ turned into this:
         | https://imgur.com/a/BVN9MRz (ran off the screen to the right)
         | 
         | > My first name is: XXX ZZZ JJJ
         | 
         | (max speed, max legibility, default stroke)
        
         | gjm11 wrote:
         | Cranking up the "legibility" I see plenty of perfectly
         | respectable "x"s. Are you sure this is "not enough training
         | data" rather than "actually, people writing quickly write
         | pretty bad 'x's"?
         | 
         | [EDITED to add:] Ah, oops, I see. You were talking specifically
         | about _capital_ X. You are right and I was wrong: the model
         | produces disastrous capital Xs even at high legibility
         | settings.
        
         | throwaway4837 wrote:
         | Neat! Try "XxXxXxXxXx", max speed/legibility/width, style 2.
         | The results are bonkers. It's just loops and scribbles.
         | Interestingly, if you write your X's from top-right to bottom-
         | left, top-left to bottom-right order, you can sort of see this
         | in action. Grab a sheet of paper and try to write "xxxxxxxxx"
         | really fast. You will see that loops are extremely common. I
         | think this might be a coincidence, but it's possible it sees
         | the kerning of two x's as a loop, then gets caught up in that
         | false state of drawing loops.
        
         | joshspankit wrote:
         | With a couple of tries I got a perfectly legible... T
         | 
         | https://imgur.com/a/PRl42rb
         | 
         | To be fair, I kind of remember handwriting X (and x) as totally
         | counter-intuitive in school.
        
         | PUSH_AX wrote:
         | The x's are bad across the board I think. Although on the whole
         | I think this is pretty cool.
        
         | _ache_ wrote:
         | I'm pretty sure you name is Tavier.
        
         | notoverthere wrote:
         | It does the same sort of thing for the @ symbol. They, too,
         | look a bit like a lowercase letter 't'.
        
         | folkrav wrote:
         | Doesn't handle accents either haha. My first name has an "e",
         | it shows up somewhere between a straight up "t" (funny that
         | it's the same letter as your "x") or some garbled mess.
        
         | zmk_ wrote:
         | It's the same with capital Z.
        
         | dspillett wrote:
         | Common punctuation wasn't particularly common in the training
         | set either: exclamations marks lack dots except style 6 where
         | it is at the top (some Spanish in the training set? Or
         | misclassified "i"s?), and [deity] knows what style 9 is doing
         | with them. Didn't dare try an interrobang :)
        
       | mnau wrote:
       | > We love our customers. ~Robotica
        
       | scrollaway wrote:
       | It seems to me it only supports ASCII. It breaks on cyrillic,
       | accented letters, less common punctuation marks, even some random
       | latin letters.
       | 
       | It's a very cool prototype but missing a LOT.
        
       | therusskiy wrote:
       | would be cool if there was an API
        
         | llagerlof wrote:
         | From a previous comment, it's an open source project!
         | 
         | https://github.com/sjvasquez/handwriting-synthesis
        
           | ygra wrote:
           | Well, the source code is available, but as there is no
           | license you can't really consider it open-source.
        
             | hm64 wrote:
             | A large number of handwriting synthesis demos are
             | derivations of/inspired by Alex Graves's paper "Generating
             | Sequences With Recurrent Neural Networks". Alex's code is
             | available under GPL-3.0 here,
             | https://sourceforge.net/projects/rnnl/. One could also port
             | the techniques described in the paper,
             | https://arxiv.org/abs/1308.0850 using any modern machine
             | learning framework.
        
       | dimatura wrote:
       | Gets confused with multiple exclamation or interrogation signs in
       | a row; seems to forget about the bottom dots.
        
       | Waterluvian wrote:
       | My very first test was: how similar is each instance of the same
       | character? Because they always just fake handwriting and
       | duplicate it and you can instantly tell it's just a font or
       | whatnot. Not this one. Not only are they unique each time, but
       | they retain the "style." Well done.
        
       | rpastuszak wrote:
       | Looks lovely. Are you planning to add diacritics or Latin ext
       | characters, (a, l, o)? I'm curious how an animation with them
       | would look as normally I'd apply them either after each word or
       | after a bigger chunk of a word.
        
       | Existenceblinks wrote:
       | Almost what I want. Is the generated written unique? I would love
       | the chance of collision akin to UUIDv4. So I can track _similar
       | but unique_ signature on digital documents.
        
       | biztos wrote:
       | On the one hand, the fact that anything outside of ASCII is a
       | failure mode is good for a laugh.
       | 
       | On the other hand, "AI" defaulting to a narrow and US-centric
       | view of the world is not doing the discipline any favors.
       | 
       | Is it really that hard to find training data?
        
         | senbrow wrote:
         | Someone created this really neat toy for us all to enjoy for
         | free.
         | 
         | They don't owe anyone anything, and certainly don't deserve to
         | be used as an example of what's wrong with an entire
         | discipline.
        
       | certik wrote:
       | I created this cursive handwriting OTF font that you can test in
       | a browser (or any other program):
       | 
       | https://certik.github.io/slabikar-otf/
       | 
       | It correctly connects letters and it can do Czech and Slovak
       | accents. It is based on a Metafont source (to be used in TeX)
       | from Petr Olsak, I wrote Python code that reproduces Metafont's
       | Bezier curves algorithm, generates curves as SVG, then calls
       | Inkscape to convert the curve to its boundary, imports back into
       | Python from SVG and then it generates OTF curves and the final
       | font.
        
         | sprak wrote:
         | Great work! Any chance that you could add the two letters o and
         | a?
         | 
         | A would be the same as u but with an "a" as base.
         | 
         | O would be the same as a but with an "o" as base.
        
           | certik wrote:
           | Yes, we can! Can you please submit a pull request here:
           | https://github.com/certik/slabikar-otf, just add the new
           | character definitions here:
           | https://github.com/certik/slabikar-
           | otf/blob/dce9fc9e575f7d6e..., here is an example how uring
           | (u) is done: https://github.com/certik/slabikar-
           | otf/blob/dce9fc9e575f7d6e....
        
         | Heliosmaster wrote:
         | Interesting: this cursive feels a lot closer than OP to the
         | cursive i was taught at my Italian Public School: example here
         | http://www.leomajor.pn.it/blog/wp-content/uploads/2013/12/al...
        
           | certik wrote:
           | Indeed! The above cursive is a Czechoslovakian style from
           | 1990s (I think it hasn't changed much since then), and most
           | European countries have quite similar cursive. In the United
           | States the cursive is actually similar also, but a few
           | letters are different, notably: z, r, t and most uppercase
           | letters. My kids learn it at public schools here in the U.S.,
           | but it is secondary after print style and assignments are not
           | accepted in cursive... (I am sure it varies from school to
           | school though.)
        
         | RobotToaster wrote:
         | Would you mind if I tried to convert it into a single line
         | opentype-SVG font for plotters?
        
           | certik wrote:
           | Please go ahead, that would be great. The output of this
           | script: https://github.com/certik/slabikar-
           | otf/blob/dce9fc9e575f7d6e... creates a single line SVG. The
           | other scripts then feed it to Inkscape and read it back as
           | outline, so you would skip this step. You can then use this
           | script: https://github.com/certik/slabikar-
           | otf/blob/dce9fc9e575f7d6e... to convert to glif and the rest
           | of the pipeline to build the font. I think I implemented
           | single line fonts in glif.py, but if not, it shouldn't be
           | hard to implement. If you are interested in collaborating on
           | this, please let me know, we can add it as another job at the
           | CI to test this mode.
           | 
           | Do you have a plotter? Send some videos and photos once you
           | get it working!
        
       | myth_drannon wrote:
       | It is still far, far from realistic cursive writing(especially
       | old documents). But it's a good starting point if you want
       | synthetic training data for writing your own handwritten text
       | recognition NNs (specially for less common languages). It's based
       | on 10 fonts only. I saw papers that had systems using 5000
       | different fonts to generate synthetic handwritten training data.
        
       | progbits wrote:
       | I've had a project idea similar to this in the backlog for years:
       | personalized signature generator that can be used to deal with
       | dinosaurs that still want printed, scanned and signed documents.
       | 
       | Basically I want to take a pdf, turn it into fake scan image (add
       | noise, some inkjet smear lines, random skew etc procedurally),
       | then generate signature image to paste over that. Zero dead trees
       | and screaming at printers involved.
        
         | [deleted]
        
         | dsego wrote:
         | MacOS Preview app has a handy feature to add a signature via
         | the trackpad or camera and then just paste it into any PDF.
        
         | linschn wrote:
         | Apart from the signature generation, here is another project
         | that does the false-scanning and signature pasting :
         | https://gitlab.com/edouardklein/falsisign
        
           | lcrz wrote:
           | These fake-scanner pdf generators always use a huge skew. A
           | tiny (random) bit of skewing makes it seem more genuine, but
           | using the same exact large rotation puts it in an uncanny
           | valley.
        
             | linschn wrote:
             | https://gitlab.com/edouardklein/falsisign/-/blob/master/fal
             | s.... Well the skew is random between 0 and 2 degrees.
        
         | AnIdiotOnTheNet wrote:
         | I scanned my signature at high resolution from blank white
         | paper, cleaned it up a little with Paint.net, and made the
         | white areas transparent. Pasting that into documents has saved
         | me a lot of hassle.
         | 
         | Legally I'm pretty sure you could also just draw an X on there
         | and you'd be fine.
        
         | stefncb wrote:
         | You might as well make a scan of your actual signature and make
         | the generator overlay the image instead.
        
           | layer8 wrote:
           | It is trivially recognizable in PDF viewers like Adobe Reader
           | that a signature image was pasted in (the image rectangle
           | around the signature highlights), and can therefore be
           | rejected as not being a genuine signature, unless you turn
           | the whole page into an image to make it look like a scan.
        
         | baq wrote:
         | Just yesterday I scanned my signature and added it to Adobe
         | Reader. It even automatically made it transparent in a correct
         | way. It didn't add noise though.
        
       | squarefoot wrote:
       | As another user pointed out, it can't correctly write accented
       | vowels. Curiously, it writes them quite differently if I add
       | spaces between them, like it was attempting to translate the
       | appearance of characters rather than picking them from a ascii
       | table.
        
       | daminimal wrote:
       | It's awesome, but it isn't internationalised and does not mention
       | not being. uooa letters ended up as weird strokes.
        
       | dominick-cc wrote:
       | This is neat. I'd like to hear a bit about how it works.
       | 
       | There is a similar paid API that does something like this
       | https://handwriting.io (seems like they are down now though) I
       | used to use it for print projects back in the day.
        
       | danielcampos93 wrote:
       | Using this shows me how bad my handwritting is. Have to turn it
       | down to minimal legibility to make it look like mine.
        
       | ginko wrote:
       | Sometimes it seems to tweak out on 'x'.
       | 
       | https://imgur.com/a/l5X7oBL
        
         | luguenth wrote:
         | i had this behavior also on small letter "t"
        
         | AstixAndBelix wrote:
         | if you want to break it just type any symbol
        
           | schnitzelstoat wrote:
           | I was surprised it failed even with n which is technically
           | still a letter.
        
         | cbm-vic-20 wrote:
         | Capital 'Z' doesn't render well, either.
        
       | massimosgrelli wrote:
       | Who is behind this project?
        
       | ape4 wrote:
       | Nice that the download is a SVG file
       | 
       | Using <path>
        
       | kebman wrote:
       | Looks pretty cool. Any support for Spencerian Script or
       | Kurrentschrift? If that's the case I'd really love it!
        
       | lvl102 wrote:
       | Would be awesome if you can download it as OTF/TTF.
        
         | Jarmsy wrote:
         | How would that be able to work? - as it doesn't write the same
         | character exactly the same twice, with both random variation
         | and adapting the letters either side.
        
       | [deleted]
        
       | kennedy wrote:
       | SO GOOD
        
       | noisy_boy wrote:
       | In order to be "realistic" it introduces too much variation
       | between the alphabets; a real handwriting has generally less
       | drastic variations and the degree of variation also varies from
       | alphabet to alphabet.
        
         | FatActor wrote:
         | "real" handwriting also gets tired so it becomes progressively
         | worse. unless the person writes a lot. which is why you see
         | people who write left-to-write on a blank page compress and
         | slant upward as they go.
        
       | whitewingjek wrote:
       | If you put an asterisk between two words, it really confuses it.
       | 
       | Really neat app! I like the differences in outcomes each time.
        
         | jchw wrote:
         | I get some pretty wild output from symbols in general. For
         | example try something like "@#$_*" and it's hard to recognize
         | anything, especially run-to-run. Very neat app in any case, but
         | I will admit I'm a bit memorized by what happens to symbols.
        
       | joshu wrote:
       | I wish this had centerline data so I could use it with my
       | plotter.
        
       | DustinBrett wrote:
       | This is indeed a very cool demo, and runs fully client side. I
       | have been trying to find a way to add this to my project for a
       | while which is a client side static website. As pointed out in
       | other comments, this is open source:
       | https://github.com/sjvasquez/handwriting-synthesis
        
         | mattsouth wrote:
         | Good find. Im loving that the README of this project includes a
         | Rick Roll
        
       | gokuldas011011 wrote:
       | Increase speed and decrease legibility, i got my signature..!!
        
       | totetsu wrote:
       | I did something like this but for dick drawings many years ago.
        
         | tzot wrote:
         | Then your favourite font must be Semi:
         | https://www.dafont.com/semi.font
        
           | totetsu wrote:
           | I used this dataset
           | 
           | https://github.com/studiomoniker/Quickdraw-appendix
        
       | lemoncookiechip wrote:
       | Want to see if I could get it to do a cliche doctor's
       | handwriting. It turned out pretty funny.
       | 
       | Input: 500mg of Amoxicillin, 3 times a day for 7 days. Lowest
       | Speed, Lowest Legibility, Lowest Stroke Width, Style 6
       | 
       | https://i.imgur.com/lH0bPBs.png
        
         | dwringer wrote:
         | Got the dosage perfect. Pretty close on the xmosmrelin. But the
         | latter half is far too legible still.
        
       | ozym4nd145 wrote:
       | If anyone's interested, I think this is the github url of this
       | project (had to dig a bit since it's not mentioned in the page):
       | https://github.com/sjvasquez/handwriting-synthesis
        
         | hunta2097 wrote:
         | Wow, it's 5 years old.
        
           | a9h74j wrote:
           | And still the style does not go to 11.
        
       ___________________________________________________________________
       (page generated 2023-01-26 23:00 UTC)