Skip to content

This Is What Happens When You Let a Neural Network Design Fonts

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.

[Erik Bernhardsson via Flowing Data]

Daily Newsletter

Get the best tech, science, and culture news in your inbox daily.

News from the future, delivered to your present.

Please select your desired newsletters and submit your email to upgrade your inbox.