Developer Alex Harri has documented an image-to-ASCII rendering technique designed to preserve crisp contours by considering the actual shapes of characters, rather than selecting symbols only as substitutes for square pixels.
Conventional programmatic ASCII conversion divides an image into a grid matching the cells of a monospace font. A basic renderer samples brightness at each cell and chooses a character according to visual density. Harri demonstrates the limitation with a white circle: a single center sample falls either inside or outside the shape, producing a coarse boundary equivalent to nearest-neighbor image downsampling.
Taking multiple samples per cell improves that first result. The averaged brightness creates intermediate values around an edge, a process known as supersampling. This reduces stair-step artifacts but produces another weakness: the output remains a low-resolution pixel image expressed through text, so boundaries can look soft and characters may align poorly with the contour they are meant to represent.
Harri’s project starts from the observation that printable characters are not interchangeable blocks. A slash, bracket and letter each contain strokes with different directions and positions. His renderer represents those characteristics through shape vectors and uses them when choosing which glyph belongs in a cell. The goal is to select a character whose marks follow the local edge, not merely one whose overall lightness resembles the underlying patch.
The approach is visible in interactive examples that include a rotating square and other animated three-dimensional scenes. Harri also applies it to a static image of Saturn. He added a cel-shading-like contrast control to strengthen the separation between regions with different colors, helping important boundaries remain legible after conversion to the much coarser character grid.
The work highlights two separate decisions in ASCII rendering. Sampling determines what information from the source image reaches each cell. Glyph matching determines how that information is expressed using a limited character set and a particular monospace font. Increasing sample quality can improve the first step, but it cannot by itself make the chosen character’s strokes align with an edge.
Harri notes that standard ASCII offers 95 printable characters, though a renderer may begin with a smaller density-ordered subset including a space. Font proportions also matter because monospace cells are generally taller than they are wide, requiring the image grid to account for that aspect ratio.
The project is a technical demonstration, not a claim that every ASCII style should maximize geometric accuracy. Hand-made text art can use symbolism and deliberate distortion. For automated conversion, however, the experiment shows that treating glyph geometry as data can produce contours that more closely track the source image while retaining the distinctive constraints of text.


