sweetcorn – LineWalk

I’m a big fan of Hershey fonts, particularly the script simplex one. It takes me back to being a kid and learning cursive, which is a big part of the aesthetics of early learning. I like how authoritative they are. As personal as cursive is, there are schools and standards of it. It brings me into the major tension of early learning that is being thrown into a space of both authority and care. I remember having to copy every curve of each cursive letter in a workbook. My handwriting was definitely a lot closer to the standard back then. As we get older, we deviate from that standard. At the root, still, is that standard. This project is structured around the standard of a hershey font, but deviates from it heavily. It treads the line between personal and public, illegible and legible, communicative and secret.

I’ve used Lingdong’s p5.hershey.js before, but there are several moments where the program picks up the pen. Accordingly, my first task was to make p5.hershey.js produce only one line. It was easy enough to move the beginShape(); and endShape(); calls to the string-level instead of the char-level, but it became clear that the characters had an assortment of issues (spacing issues, lines going every which way, and  disconnected bits). I had to go into p5.hershey.data.js and shift some coordinates around. One tool I did not think I’d have to use was one relating to Caesar ciphers. The contents of the data file are more or less a series of coordinates in ASCII centered at the character ‘R’. In order to fix some spacing issues, I had to shift the x coordinates by some value, which would mean turning each letter into another letter some alphabetical distance away, which is what a Caesar cipher does. This was probably the most tedious part of the project. I eventually got the majority of the kinks worked out and had made a decently functional tool for creating single lines of cursive in an SVG format. Now the question became what to do with this tool?

I remember how wild it was to hear Allison Parrish favor character- or a-few-character- level markov chains over word-level ones in her workshop. We moved beyond the word as the unit and into the character as the unit. What if we go deeper? What if words aren’t constituted by characters, but by points? We can go beyond the character level, then, in markov text generation. In order to do this, I got the coordinates of every alphabetical bigram (“aa”, “ab”, …, “zy”, “zz”) using my single-line-hershey tool. I realized this wouldn’t work as is because the x-values would be increasing and there wouldn’t be anything for the markov chain to root on to. So I turned them into a series of vectors, each pointing from the previous point to the current one. I was then able to use this array of series of coordinates in a markov chain, using an order of three coordinates (x, y, x_next).  This was another major annoyance to get to. It’s probably foolish, but I stored each bigram’s coordinates as a space-separated string. What I didn’t do was make each coordinate uniform. Some had 16 decimal places, others had none, some negative, some positive. I spent too long getting these to be uniform in order to get an actual coordinate-level markov chain functioning. I then generated a string of vectors and wrote a function to walk through them, leaving vertices behind. The result is something that looks like handwriting. Perhaps this project is better suited for the asemic writing prompt.

Below are some short-word generations (1000 coordinates or so)

… and some long-word (maybe a quick sentence) generations…

… and a gallery of some nice SVGs produced

 

… and a screenshot

My code can be found here (it’s a bit of a mess).

-xoxo

sweetcorn