Area-coverage antialiasing 2026-11-05
Area-coverage antialiasing assigns an edge pixel a value based on the fraction of its footprint covered by a geometric shape. In a simple rasterization model with constant foreground value , constant background value , and a uniformly weighted pixel region , let be the shape. ThenEquivalently, is the average of the shape's indicator function over . This is a spatial average: a partially covered opaque shape can produce an intermediate pixel value without its material being transparent. Filtering the image over a finite region reduces the abrupt changes produced by deciding coverage at one sample point.[ref]
For a worked example, take the unit-square pixel and a white shape covering over a black background. The diagonal divides the square into equal areas, so and the pixel gets half the white value. A single center sample lies exactly on the edge and must choose one side by a convention; a tiny edge movement can flip that binary decision. The covered area instead changes continuously. The arithmetic applies to values proportional to light, before a nonlinear display encoding.
Exact geometric coverage and multiple sample tests are two ways of estimating this average; a finite set of samples can miss a sufficiently thin shape. Uniform footprint averaging also has limits: its abrupt filter boundary does not remove every high-frequency component, so it reduces aliasing without guaranteeing a perfectly band-limited image.[ref]
Physically Based Rendering: From Theory to Implementation (4th edition) by Matt Pharr and others. section 8.8.1, box filter and residual aliasing
Grid fitting 2026-11-05
Grid fitting adjusts scaled glyph geometry relative to a target pixel grid before rasterization. TrueType font hinting can move outline points to preserve important strokes and alignment at small sizes. The result depends on the requested resolution and transformation.[ref]
TrueType Fundamentals by Microsoft. From Font File to Paper; instructions and grid-fitting distortions
A simple area-coverage antialiasing model shows the problem. A vertical stroke from horizontal coordinate 0.4 to 1.6 covers 60 percent of each of two neighboring pixel columns. An equal-width stroke from 3.9 to 5.1 covers 10 percent, 100 percent and 10 percent of three columns. Both geometries have width 1.2 pixels, yet their darkest columns differ. Snapping their boundaries to give each stroke one full column changes the outlines but gives consistent displayed stroke weights.
This is a tradeoff between geometric fidelity and small-size legibility, rather than a change to the stored Unicode text. Grid fitting operates on the geometry supplied to the rasterization step; glyph substitution and glyph positioning address the forms and layout that precede it.
Pixel coverage before and after grid fitting
. Original ideal area-coverage antialiasing model of rectangular strokes, not measurements of a particular computer font. The unfitted strokes both have width 1.2 pixels, but their placements give different column coverage. The fitted strokes each occupy one full column; their changed geometry is explicit. Red dashed lines mark the geometric stroke boundaries. Details.