Analyzing 50k fonts using deep neural networks Coding experiment by Erik Bernhardsson uses neural networks to see if it is…

prostheticknowledge:

Analyzing 50k fonts using deep neural networks

Coding experiment by Erik Bernhardsson uses neural networks to see if it is possible to generate new fonts based on a dataset of existing ones:

For some reason I decided one night I wanted to get a bunch of fonts. A lot of them. An hour later I had a bunch of scrapy scripts pulling down fonts and a few days later I had more than 50k fonts on my computer.

I then decided to convert it to bitmaps. It turns out this is a bit trickier than it might seem like. You need to crop in such a way that each character of a font is vertically aligned, and scale everything to fit the bitmap. I started with 512 * 512 bitmaps of all character. For every font you find the max y and min y of the bounding box, and the same thing for each individual letter. After some more number juggling I was able to scale all characters down to 64 * 64.

If you take the average of all fonts, here’s what you get:

More Here