docs: record the integer line advance verification and its visual regression - #39
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #37. That report concluded no uniform correction works; this one identifies the rule that does, verifies it against the browser, and records why it still cannot ship yet.
The mechanism, confirmed
Figma advances each line by
round(fontSize x ratio)and the browser accumulates the fraction. With absolute pixel emission all seven measured text blocks match their design height exactly - 245/69/36 on mobile, 272/62/47 on tablet, 272 on desktop - including the font-size-dependent sign reversal that made every uniform correction fail before.Why it is not merged
landing-833-3640landing-833-3322landing-832-2975The experimental Rust change and its tests were removed. No threshold, plugin golden, manifest checksum, fidelity classification, provenance entry, or source map changed.
What the rejection actually revealed
Fixing the advances did not add an error - it exposed one that was already there. With pixel emission every subtitle lands on its design Y exactly, and every benchmark section lands exactly two pixels low, at all three widths:
At the wider widths the baseline's short text was partly cancelling that displacement, so the wide-width numbers were bought with compensating errors rather than earned. A scattered multi-source error is now a single width-independent +2px with a known location.
Direct PNG band measurement separates advance from glyph placement: the desktop candidate has exact 68px band advances while its glyph bands sit one pixel above Figma's, which is rasterisation rather than layout.