Hélder Monteiro
Experiment · weights written by hand

SnapFont

An experiment: a font identifier for photos of lettering. Its weights were written by hand and its font rows measured from the fonts' own files; nothing was trained.

Catalogue1,685 families, 7,017 styles
Per letter89 named measurements
TrainingNone

How it works

Your four corners straighten the photo. The page evens out the light, finds the lines of ink, and cuts them into the letters you typed: each character has a typical width, and cutting through ink costs. Every letter then gets 89 named measurements: its shape on a 6 × 6 grid, its outline from four sides, and structural ones such as stroke weight, contrast, stress, slant, serifs, counters and width.

Each letter is compared with the same letter in 7,017 styles of 1,685 families, from Google Fonts, Apple's and Microsoft's built-in fonts. The font rows were measured from the fonts' own files by the same code that reads your photo, and only the rows for the letters you typed are loaded. It runs in your browser, and nothing is sent anywhere.

Results

Sealed test, right font first (2,872 screenshots)76.2%
Right font in the top 586.8%
Undamaged screenshots, right font first88.3%
Picking a family at random0.06%

The test screenshots were kept sealed and scored once, on the finished weights. The 17 weights of the measurements were written by hand and then adjusted by a small search on separate development screenshots (each tried ×2 and ×½); development scored 75.8%, so the search did not overfit.

Limits

Near-twins such as Helvetica, Arial and Inter differ in only a few letters, so text without those letters leaves them tied. Logos and hand-painted signs still get an answer, but it's the closest font, not a match. Outline, 3D and neon effects change the shapes it measures, and real phone photos are harder than screenshots: of 8 photos so far, 5 had the right font first.