The problem with "trace every point"
The most literal way to redraw a boundary is to visit every point the earlier stages measured and connect them with straight lines. That produces a shape made of hundreds of tiny segments — technically accurate, and useless. Every jitter in the original measurement becomes a visible kink. A circle drawn this way is not a circle; it is a many-sided polygon wearing a circle's outline.
The opposite mistake is just as real. Describe the same boundary with too few shapes — one long curve standing in for what was actually three — and the drawing drifts visibly away from the true edge. Too many shapes wastes effort recording noise. Too few loses the picture. This stage finds the point in between: the fewest shapes that still explain what was actually measured.
A single rule that trades honesty for economy
Every candidate description — a line here, a curve there, a break at this point or that one — is priced by one rule: how well it matches what was measured, plus a fixed charge for every number it takes to write down. A description that matches slightly worse but needs six fewer numbers can still win, if the six numbers cost more than the small mismatch is worth. A description that matches almost perfectly but needs twenty extra numbers to do it usually loses.
This is the same idea as writing a good summary of a long report. A summary that keeps every sentence is not a summary. A summary that drops the argument to save a paragraph is not faithful. The useful summary sits between the two, and the test for where to stop is whether the next sentence you could add is worth the space it takes. This stage runs that test formally, on every possible boundary and every possible shape, rather than by feel.
The most surprising fact in this stage
It would be reasonable to expect that charge-per-number to be a sensitive knob — turn it up, get a much simpler drawing; turn it down, get a much more detailed one. It is not. The charge enters the trade-off under a square root, and the charge itself is a logarithm of image size divided by output precision. Two dampening effects, stacked.
Concretely: doubling the charge per number widens how far a curve is allowed to drift from the measured points by only about 41%, not 100%. And getting the charge to double in the first place needs the image to become ten times bigger, or the output precision to become ten times finer. Put together, changing the output precision by a factor of ten moves the actual shape of the drawing by only about 13%.
That is the opposite of what a "quality knob" is supposed to do, and it is deliberate rather than accidental — a genuine measurement of how flat this trade-off is was made on the real corpus, and it stayed flat across a wide range of settings that looked, on paper, very different. The two real levers this stage has are how precisely each point was actually measured — inherited from earlier stages, not set here — and the fixed price of each kind of shape in the alphabet. Turning the headline knob is close to turning nothing at all.
Searching every possible place to break the line
Deciding where to put the joins between shapes is not a matter of eyeballing corners. The method considers every possible split of the boundary into pieces, and for every piece, every shape in the alphabet that could describe it, and finds the single combination that adds up to the lowest total price. This sounds like it should be catastrophically slow — checking every combination of every split — but the trick is that the best way to reach any given point on the boundary only ever depends on the best way to reach some earlier point, never on guessing the whole path at once. That lets the search build its answer forward, point by point, keeping only the best route to each point rather than re-exploring the world from the start every time.
This is checked, not just argued: an independent brute-force search that genuinely tries every combination is run on hundreds of small test shapes, and its answer is required to match the fast method's answer, on the nose, every time.
What the alphabet contains, and what each letter costs
A straight line is the cheapest shape — two numbers, an endpoint. A smooth curve costs six numbers — two control handles plus an endpoint — because it can bend in ways a line cannot. A circular arc sits in between at five numbers, and it earns its place honestly: many real logos and icons are drawn from actual circles, and an arc describes that shape exactly, at less cost than the curve that would otherwise be needed to approximate it.
Five is a judgement, not a count: the file itself spells an arc out in seven numbers (two radii, a rotation, two yes-or-no flags and an endpoint), and the benchmark counts seven. Charging the seven was tried. About half the arcs then become curves or lines, and the test icons needed about 1.4 % fewer numbers at 512 px with the colour unchanged on average, provided a single curve is not allowed to stand in for more than a quarter of a circle (past that it visibly misses it) and each number is spent a little more freely. But on a second, held-back set of icons the colour got worse, and a few corners came back as spikes, so the tracer still charges five; the experiment is kept in the code, switched off.
Lines alone hit a wall no amount of clever placement can fix. Approximating a circle with straight chords needs dozens of short segments to stay accurate; four well-placed curves do the same job to a fraction of a percent of error. So the alphabet has to include curves and arcs, not because lines are wrong, but because some shapes simply cannot be told cheaply in a language that only has straight lines.
Corners are not where the measurement puts them
A camera, or a rendering engine, cannot draw an infinitely sharp corner — it always rounds the very tip off by a pixel or so, the same way a photograph of a sharp table edge shows a hint of blur right at the point. Trusting the measured point at a corner literally would draw every corner very slightly rounded, and would waste an extra shape bridging the rounding on the way there.
The fix is to find where the two straight edges either side of a corner actually meet, algebraically, rather than trust the rounded sample sitting between them — but only where there is genuinely a corner to find. Trying this on a smooth curve, where two neighbouring pieces are nearly parallel, is like trying to find where two nearly parallel roads on a map cross: the answer exists on paper but can be miles from either road. So the correction only fires where two pieces meet at a real angle, and even then, only up to a distance the measurement's own honesty allows — never further than the corner could plausibly have been rounded by the rendering process that produced it in the first place.
Passes that clean up afterwards, on by default and off by default
Two small tidy-up passes run automatically after every fit: rejoining a short run of segments into one smooth curve when a corner's rigid geometry made it look artificially expensive, and replacing a curve that is really just the camera's rounding of a corner with the sharp corner it stands in for.
The first of these is where most of the fitting time used to go. For each short run it searches for the single curve that fits best: about two thousand rough candidates first, then a fine search from the most promising one, each candidate measured against every point of the run. Almost all of those candidates lose, so since October 2026 a candidate is first checked with a cheaper quantity that is provably never larger than its real misfit, and only a candidate that survives that check is measured exactly. The rough candidates also share most of their arithmetic, which is now done once and reused. Neither change alters a single number in the output; the drawing is the same to the last bit, it just arrives sooner.
A third pass moves the joins between curves to where a designer would put them. Type designers and icon artists place a curve's points at its top, bottom, left and right, where the curve runs exactly horizontal or vertical, so that every handle an editor shows there points straight along an axis; Adobe's specification for its fonts has asked for this since 1990. The fitter had no reason to: it puts a join wherever a measured point happens to lie, and moving a join along a smooth curve hardly changes the drawing. The pass offers, for every smooth stretch, the same stretch with its joins at those extreme points and every join smooth, and keeps it only where the fitter's own measure of fit and economy prefers it. A join at an extreme point is credited for the one number it no longer has to write: its direction. On the 246 test icons this moved the trace closer to the artists' files on the gate's own measures (see the reference document), without writing a single number more or fewer.
Two more exist in the code but are built only into research versions of the program, never into a release. One would snap a line to be perfectly horizontal or vertical when the measurement genuinely cannot tell it apart from one — real drawings do this constantly, and the evidence for it is strong, but turning it on made almost no measurable difference to the finished picture. The other would rewrite two neighbouring curves to share a handle exactly, the shorthand professional design tools write automatically — again, well-supported by how real artwork looks, and again, not worth it on the measurements.
A whole circle, or a run of curves?
Every boundary is also offered as one whole shape: a circle, an ellipse, a rectangle with or without rounded corners, or a run of circular arcs. Both descriptions are priced by the same rule, and the cheaper one is written. A boundary that really is a circle comes back as three numbers rather than four curves; one that only looks roughly round keeps its curves. This choice is worth a lot: taking the whole-shape option away makes the traced files carry about 30% more numbers.
The image's own border is the commonest whole shape of all — on most icons the background touches every edge, and its boundary is the frame of the picture. The rectangle won that contest every single time it was measured, so the frame is now tried as a rectangle first, and when the rectangle is cheaper than any curve could possibly be, the curve search is not run at all. On every other boundary the curve search and the whole-shape search run at the same time on different processor cores. Both shortcuts give exactly the answer the full comparison would have.