Skip to content

docs: record the integer line advance verification and its visual regression - #39

Merged
owjs3901 merged 1 commit into
mainfrom
owjs3901/integer-advance-verification
Sep 12, 2026
Merged

docs: record the integer line advance verification and its visual regression#39
owjs3901 merged 1 commit into
mainfrom
owjs3901/integer-advance-verification

Conversation

@owjs3901

Copy link
Copy Markdown
Contributor

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

Screen Width Baseline Pixel emission Bar
landing-833-3640 360 11.41% 9.64% gain
landing-833-3322 992 3.10% 3.71% reject
landing-832-2975 1920 1.84% 2.31% reject

The 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:

Node Design Y Baseline Y Pixel Y
Mobile subtitle 359 360.95 359
Tablet subtitle 546 544.38 546
Desktop subtitle 496 494.38 496
Mobile benchmarks 888 893.13 890
Tablet benchmarks 940 940.75 942
Desktop benchmarks 900 900.75 902

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.

@owjs3901
owjs3901 merged commit 47da788 into main Sep 12, 2026
8 checks passed
@owjs3901
owjs3901 deleted the owjs3901/integer-advance-verification branch September 12, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant