Neural networks are increasingly taking on jobs that used to be the preserve of the human brain. So Erik Bernhardsson decided to see what would happen if he threw 50,000 fonts at a neural network and left it to chew at them. The results, it turns out, are pretty interesting.
To feed the fonts to the AI, he created grids of charactersāeach character fitting in a 64Ć64 pixel boxāso they could then be directly compared with one another. In the process he got the neural net to create what he calls a āfont vectorāāa kind of abstract mathematical construct that singularly defines the font. You can read about the details of how he did that in a blog post here.
More interesting is what can be done with the resulting vector, as Bernhardsson explains:
Since every font is a vector, we can create arbitrary font vectors and generate output from it. We canā¦ pick a font vector and generate new fonts from random perturbationsā¦ We can also generate completely new fonts. If we model the distribution of font vectors as a multivariate normal, we can sample random vectors from it and look at the fonts they generate.
In fact, thatās what you can see in the gif above. Itās pretty smart, too: Itās learned, for instance, that many fonts use upper case characters for the lower case set, and it intelligently switches between the two depending on the type of font itās creating.
Neural nets might not take over the job of designers just yet, sure, but itās a pretty cool project that demonstrates just how versatile they can be. You can go and read all about it here.