Sharpened type errs on its dark side
Assumes The eye counts a corner's error, not its peak, The eye keeps the lightness errors and An average on the stored values.
The eye counts a corner’s error, not its peak put a sharpened square through a model of the eye’s spatial filtering over the plane and found that its corner survived where its edges did not. An unsharp mask taken on stored values rather than on light errs lighter on every pixel it touches, so the error does not cancel when the eye pools neighbouring pixels, and a corner is where the halos of two edges land in the same pool. On a printed page the corner of a skin-coloured square was seen at 2.4 times its edge.
That essay ended on the case that matters most for print. A page of type is nothing but corners and stroke ends, and scanned pages are sharpened as a matter of routine. The prediction was sharp: a sharpened glyph at print resolution should show its halos at its corners and stroke ends and hardly along its stems, and the share of its seen error within two pixels of a corner should be several times the share of its outline that lies there.
The computation below makes that measurement on four capital letters at six sizes, in black on paper and reversed out of black. The prediction fails for the ordinary case and holds, more weakly than predicted, for the other. Why it fails is a single fact about which side of an edge a reader’s eye leaves the error on.
Black type does not gather its error at its corners
Sharpened black type on paper does not concentrate its seen error at its corners at any size from 6 to 24 point. Its outer corners and stroke ends hold between 0.64 and 0.97 of their share of the outline, and its inside angles about their share. The same letters reversed out of black gather it at their outer corners, at 1.6 to 2.6 times their share, and carry two to three times as much error in total.
- The corner zones are 30 per cent of a 10-point letter’s outline and hold 26 to 27 per cent of the per-pixel error — close to their share, in either polarity.
- As seen at 40 centimetres, black type’s corner zones hold between 0.67 and 1.03 times their share across E, H, L and T. The square’s corner effect is not there.
- Reversed out of black, the same letters’ corner zones hold between 1.27 and 1.48 times their share, and the outer corners alone 1.79 times.
- As seen, 77 to 90 per cent of the error lies on the darker side of the edge, for all four pairs of colours tested, whichever side the letter is on.
- Per pixel, reversed type carries the same error as black type. As seen, it carries 1.7 to 3.0 times as much.
What a sharpened letter looks like to the eye
The figure is a 10-point E, black on paper at 300 dots an inch, sharpened by an unsharp mask of amount one and radius 1.5 pixels — the same mask the square was sharpened with. The two maps show the colour difference between the mask taken on stored values and taken on light: pixel by pixel on the left, and after the eye’s three spatial channels at print distance on the right. The outline is drawn thin, and each corner is circled at a radius of two pixels.
Per pixel, the error is a thin double contour round the whole letter, one band in the paper just outside the ink and one a little way inside the ink, with nothing marking the corners out. The circled zones cover 31 per cent of the outline and hold 28 per cent of the error.
As seen, the double contour has become a single blur that sits inside the strokes. The stems and bars are filled with it, most heavily along their length, and the circled corners are no darker than the stretches between them. They hold 25 per cent of the seen error, less than their length share. The eye has done to the letter the reverse of what it did to the square.
Reversed out of black, the same letter behaves like the square. Per pixel, its map is almost indistinguishable from the black letter’s: a double contour, the corners holding 29 per cent of the error. As seen, the error has moved outwards into the black ground, and it has gathered at the letter’s outer corners and at the ends of its three arms, where the dark ground wraps round the pale stroke on three sides. The corners hold 39 per cent of the seen error on 31 per cent of the outline. And the whole map is darker: the same per-pixel error has become more error to the eye.
Letter by letter
The four letters were chosen for their mix of corners. L has five outer corners and one inside angle and a long uninterrupted stem; T has six outer corners and two inside angles, where the stem meets the bar; E and H each have eight outer corners and four inside angles. Every letter is built on a five-by-seven grid with a stroke one cell wide, so the corners are known exactly rather than detected.
Every black letter’s bar sits at or short of its tick: E holds 25 per cent against 31, H 22 against 32, L 16 against 24, and T 33 against 32, the only one to reach its share. Every reversed letter’s bar reaches past its tick, from 35 per cent against 24 for the L to 48 against 32 for the T. The T is the best-placed for its corners in both polarities, because its six outer corners are all stroke ends, sticking out into the ground on three sides, and a stroke end is the most exposed shape a letter has.
The spread between letters is smaller than the spread between polarities. Whatever arrangement of corners a letter has, which side is black matters more.
The error lies on the dark side of the edge
The mechanism is visible in a single line across one edge. The figure below cuts across the left edge of a solid 24-point block, large enough that the two sides of the edge are well apart, for black on paper and for paper reversed out of black.
Per pixel, the error comes in two bands, one in the paler colour two pixels out from the edge and one in the darker colour a few pixels in. They are the mask’s two halos, the bright overshoot beside the edge and the dark undershoot on the other side, and in each the stored-value result is lighter than the light-value result by several units of lightness. An average on the stored values traced that one-sidedness to the curvature of the encoding: a sharpen is an average with a negative weight, a resize with a negative weight in it showed which way such weights push a stored-value result beside an edge, and an unsharp mask is lighter on every pixel it moves.
As seen, the bands merge and the peak moves to the dark side. Three quarters of the seen error along the cut lies in the black, in both polarities. The eye’s filter pools each halo with its neighbours, including the ones across the edge, and the pooled error is then read in lightness — and CIELAB lightness is steep in the dark. The straight piece under the cube root priced the same steepness in shadows: a difference in light that is small against paper is large against ink. So the eye moves the error across the edge, and CIELAB charges more for it on the dark side. Measured over the whole block rather than one line, 78 per cent of black type’s seen error lies in the ink and 90 per cent of reversed type’s lies in the ground. For skin against its shadow it is 87 per cent, and for the same pair reversed 77 per cent. In every case the larger share is on the darker side.
A corner holds the dark ground round it
Once the error lives on the dark side, a corner’s share of it follows from geometry. Draw a small circle round a point on a straight edge: half of it is on the dark side. Draw the same circle round a corner where a pale shape points into dark ground: three quarters of it is dark. Round a corner where a dark shape points into pale ground, a quarter.
The four pairs split exactly by which side is dark. Where the letter is pale and the ground dark — type reversed out of black, and skin on its shadow — the outer corners hold 1.79 and 1.50 times their share, and the inside angles, where the pale stroke wraps round a notch of dark, 0.24 and 0.28. Where the letter is dark and the ground pale — black type, and shadow on skin — it goes the other way: the outer corners hold 0.69 and 0.62, and the inside angles 1.00 and 1.40.
The circle arithmetic predicts a half and one and a half, and on a solid block it lands close: a black block’s four corners hold between 0.52 and 0.55 of their share at 10, 16 and 24 point, within a few hundredths of the quarter-disc a pointed corner has. The square in the eye counts a corner’s error, not its peak — like the magnified patch in the corner of a resized patch is lighter than its edges before it — was skin on its shadow, a pale shape on a dark ground, so its corners were the wrapped kind and they gained. The prediction carried that polarity across to type without saying so, and type is printed the other way round.
Why a stroke cannot wrap a corner
One number in that figure is out of line with the geometry. Black type’s inside angles should hold one and a half times their share by the circle argument — the ink wraps round a corner of paper there — and they hold 1.00. Shadow on skin, the other dark-on-pale pair, holds 1.40.
The circle argument assumes the dark side is at least as wide as the circle. A 10-point stroke at 300 dots an inch is 4.2 pixels wide, and the eye’s lightness filter at print distance pools over a few pixels. At an inside angle the ink has three quarters of the circle only if the stem and the bar are each wider than its radius; when they are not, most of the three quarters is paper again on the far side of the stroke.
The sizes separate the two effects. Black type’s inside angles stay between 0.87 and 1.15 of their share from 6 to 16 point, and reach 1.53 at 24 point, where the stroke is ten pixels wide and the ink finally has room to wrap. Black type’s outer corners stay under one at every size. Reversed type’s outer corners rise from 1.60 at 6 point to 2.64 at 24 — above the circle’s one and a half, so at large sizes the area of dark ground is not the whole of what a wrapped corner collects, and what the remainder is has not been separated here.
For text sizes, that is the whole answer. A book is set at 9 to 12 point, and at those sizes on a 300-dot page the dark side of black type is a stroke too narrow for any of its corners to be wrapped. The error is spread along the strokes, a little thinner at the corners than along the stems, and a sharpening test on a corner target would pass black text for the wrong reason — its corners are not where its error is.
Reversed type carries more of it
The polarity also decides how much error there is, and the answer is not in the per-pixel map.
Per pixel, black type and reversed type carry the same summed error, within a quarter at every size and within five per cent at 6, 10 and 24 point: the mask moves the same pixels by the same amounts whichever colour is inside the letter. As seen, reversed type carries between 1.7 and 3.0 times as much. Taking the error from pixel to pool raises black type’s by a factor of 1.0 to 2.0, and reversed type’s by 2.4 to 4.4. The side the error is pooled onto is dark in both cases; the difference is how much dark there is to pool it onto. For black type that is a stroke; for reversed type it is the page.
Part of the excess survives at 24 point, where the strokes are wide, so the stroke width is not the whole of it. What the rest is has not been separated here: the reversed page has more dark area within reach of every edge whatever the stroke width, but whether that accounts for the whole factor at large sizes is not measured.
What a scanning pipeline can take from it
Three things, each cheap.
Test sharpening on reversed type, not on black type. The earlier advice was to test a sharpening step at corners rather than at straight edges, because a corner is where a one-sided halo survives. For type the right target is reversed type, where the corners are the wrapped kind and the page is dark; black text on white is the configuration in which a stored-value sharpen does least harm to the eye, and a test that passes it has tested the easy case.
Expect black text to tolerate it. A scanned page of ordinary black text, sharpened on stored values, carries its error spread thinly inside the strokes rather than piled at corners. Linear-light sharpening is still the correct operation — the eye keeps the lightness errors showed that the lightness part of the error survives the eye — but the case for it is weakest on the pages it is most often argued for.
And do linear-light sharpening where type is reversed, on dark headers, captions set white on photographs and screens of pale text on dark grounds. The same mask on the same letters leaves up to three times the seen error there, gathered at exactly the features a reader’s eye goes to at the ends of strokes.
How the letters were built and filtered
Each letter is a union of cells on a grid five wide and seven tall, one cell per stroke, with its cap height set to 0.7 of the body at 300 dots an inch — 17.5 pixels at 6 point, 29.2 at 10 and 70 at 24. It is rendered into a 128-pixel field by exact area coverage and mixed in light, since a scanner measures light before it encodes; the ink is the encoded triple 0.05, 0.05, 0.05 and the paper 0.92, 0.90, 0.86. The mask is applied, separable, once to the encoded field and once to the linear field, and both results are clipped to the encoding’s range.
Both fields go through the model’s three opponent channels, each filtered in two dimensions by its own low-pass transfer function at 82 pixels a degree, with mirrored borders — the method the square was measured with, including the reduced sensitivity to oblique orientations that a pattern has a direction measured. The colour difference is ΔE₀₀ between the two fields, pixel by pixel before filtering and after.
Every pixel’s error is assigned to the nearest point on the letter’s outline, sampled at an eighth of a pixel. The corner zone is the part of the outline within two pixels of a corner, and a corner is outer when one of the four grid cells meeting there is filled and inside when three are. The concentration is the zone’s share of the summed error over its share of the outline.
What this leaves out
The letters are built from rectangles, so every corner is a right angle and every stroke end is square. Real type has serifs, curved bowls and diagonal strokes, and a serif in particular adds small wrapped corners of paper to black type at every stroke end. Whether a serifed 10-point face behaves like the black letters here or like the 24-point ones, where the inside angles gather, is not measured.
The sharpening is one mask, amount one and radius 1.5 pixels. A larger radius spreads each halo further into the ink and would let a narrower stroke behave like a wide one; the size at which black type’s inside angles begin to gather should fall as the radius rises.
The eye is a model, the same set of contrast-sensitivity functions measured with gratings at threshold and applied to errors far above it that every threshold was measured with a grating names as the standing caveat. The finding rests on two robust properties of it — that it pools over a few pixels at print distance, and that the lightness scale it hands the error to is steep in the dark — rather than on the exact shape of any curve. Whether a reader sees reversed type’s sharpening error at twice or three times black type’s is a prediction, not a measurement.
Still open: whether a serif gives black type corners
The finding turns on one geometric fact: black type’s dark side is a stroke, too narrow at text sizes to wrap round a corner. A serif changes that. At every stroke end it adds a short bar across the stroke, and the join between stem and serif is an inside angle where ink wraps round a small notch of paper — the configuration that gathered error on the 24-point letters and not on the 10-point ones.
The prediction is that a serif face does not gather at its serifs either, because a serif is thinner than a stem and the notch it makes is smaller than the eye’s pool at 10 point. If that is right, the result here holds for ordinary book type and not only for the sans-serif rectangles it was measured on. If it is wrong — if the brackets of a serif face collect error the way a 24-point inside angle does — then it is the serif, not the corner, that a sharpening test for text should be aimed at, and a slab face would be its worst case.
The computation is the same filter on letters built with serifs one third of a stem wide, at 9, 10 and 12 point, with the inside angles at the serif brackets reported separately from those at the junctions of stem and bar.
The side before the size
The habit is about where an error is read, not only how large it is.
A per-pixel difference map says how far the processed image is from the correct one, pixel by pixel, and it is the same map for black type and for reversed type. The eye does not read that map. It pools each error with its neighbours, over a region set by the viewing distance — the pooling a halftone is a luminance object relies on to hide a screen’s dots — which carries error across an edge, and it reads the pooled result on a lightness scale that charges far more on the dark side than on the pale one. So the question that decides where an error will be seen is not where the processing put it but which side of the edge is darker, and how much dark lies within the eye’s pool of each place.
The move is to ask that question before ranking any feature by its per-pixel peak. It changed a prediction about corners into its reverse for the most common thing ever printed, and it turned two pages carrying the same per-pixel error into pages carrying two or three times different amounts of seen error. The failure mode is to carry a finding across a change of polarity without saying so — to measure a pale shape on a dark ground and apply the result to dark type on a pale page, as though the two were one configuration with the colours swapped. For the eye they are not.
Named alongside this one
Essays reaching for the same objects. Nobody chose these; they are what the index of named objects makes visible.
- A difference has no size contrast sensitivity · δe · image difference · spatial frequency · viewing distance
- A tint at the edge of a page contrast sensitivity · δe · image difference · spatial frequency · viewing distance
- How fine a colour edge can be contrast sensitivity · image difference · opponent processing · spatial frequency · viewing distance
- Measured with an aperture, seen with an eye contrast sensitivity · lightness · spatial frequency · viewing distance
- What a still eye stops seeing contrast sensitivity · opponent processing · spatial frequency · viewing distance
- Banding is not a bit depth contrast sensitivity · spatial frequency · viewing distance
The objects this essay names
Each one links to every other essay that touches it.
Contrast sensitivityΔEGammaImage differenceLightnessLinear lightOpponent processingSharpeningSpatial frequencyViewing distance