A Machine Learning Font

ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789 !?@&#*

“Type is a beautiful group of letters, not a group of beautiful letters.” — Matthew Carter
This is neither.

3000 Training steps / ~3 hrs cpu

5000 Training steps / ~5 hrs cpu

10,000 Training steps / ~8 hrs cpu

Could a machine learning model be trained to generate realistic (or just interesting) letterforms? As it turns out, yes, albeit with mixed results. A styleGAN model was trained in RunwayML on a dataset of 2674 Google fonts organised as individual image-per-glyph in Drawbot. Runway-generated images were then piped via Python in to GlyphsApp to process the final font.

Some characters took longer/more steps to create recognisable forms but generally speaking each glyph was processed on 3k model training steps. For example, the /b/ despite being crudely described as a simple reflection of a /d/ was non-compliant and required three separate training attempts and an ever increasing step-count to eventually be recognised as the letterform itself. Other times a glyph would come out almost too perfectly first time of asking. So it was very much hit and miss. This inconsistency does to some degree explain the clusterf*ck of forms that make up this ‘alphabet’. I estimate something like 550 hours of total training time for 110 unique glyphs. The font comes in two versions, modified and unmodified (see below). Both versions of the font contain diacritics and composite forms.

I’ll add a variety of process documentation, scripts and datasets to github in the future. If interested follow NaN on twitter for updates.

This process wasn’t without its flaws but eventually produced a curio of a font while hinting at the possibilities and limitations of machine learning type.

 

v1. No modification.

v2. Forms flipped horizontally where applicable + cleaner spacing.

MachineLearningFont-v1.otf

 “Type your own text here…”

THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

A project by