LockerGnomeTech news and nostalgia for today's technology professionals
Subscribe

Search

Softwareopen source

Neuronte draws letters from tiny neural networks, then caches them like ordinary text

The current C library separates small pixel faces from designs that resize and publishes the compromises alongside them.

Chris pouring glowing dots from a small jug into a cell where they settle into a curved stroke
Illustration: LockerGnome

The font weights are actual weights. Neuronte stores the shapes of its characters in neural networks, giving typography a particularly literal interpretation of training a typeface.

Its maker describes a C library with no conventional font file, glyph table or bitmap atlas behind the letters. Instead, a small multilayer perceptron answers a geometric question: how far is this point from the character’s ink? Asking that question across the cell produces the pixels a program can draw.

A routing table chooses the small network trained for a character. That avoids running one large model for everything, according to the project’s explanation. The shipped set includes text, emoji, icons and other graphics, rather than forcing one network to moonlight as the entire desktop.

The README calls the current slim repository 33 MB. That number covers the collection, so it would be misleading to present it as the unavoidable size of a single letter-drawing job. A program opens the weight file for the work it needs. Still, a supposedly slim font collection measured in megabytes makes the word lightweight work for its lunch.

Tiny desktop text gets special treatment. Sizes from one to sixteen pixels have their own hand-placed designs and corresponding networks. From seventeen to thirty-two pixels, one face handles the range. Larger text uses another face with smooth edges. The README explains that simply shrinking that larger design failed its legibility requirements, so the little sizes keep their own drawings.

The current resizable Latin-1 face adds accented characters, while the small hand-drawn faces lack accented letters. That difference matters a lot more than an attractive screenshot when somebody needs to display real names. A font that draws the right letters quickly still needs to contain your letters.

The maker reports 62 to 75 microseconds for an eleven-pixel string after its letters are cached, against 193 to 261 microseconds using DejaVu Sans through FreeType. Those measurements belong to the project’s published comparison. They do not establish that every application gets a faster first draw, or that the two approaches have identical typography features.

The caching explains the apparent trick. Once a character has been drawn, repeating it becomes a copy. Compose enough text from those kept masks and the neural network can sit out the ordinary workday. Even the experimental font has discovered the benefits of reusing yesterday’s work (management material).

The remaining question is where this representation proves useful beyond the demonstration. The repository supplies source, face descriptions and measurements to investigate it, without pretending the experiment has already replaced ordinary font systems.

The letters have finished training.

More Software

Every Software story →