feat(registry): add the weight-wave kinetic type block - #3110
Closed
miguel-heygen wants to merge 1 commit into
Closed
feat(registry): add the weight-wave kinetic type block#3110miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
A wave of thickness travels along a headline: letters swell from light to black and lean into the crest, then settle. Every kinetic type move we own animates transform, opacity or a mask. This animates the letterforms themselves, which is a different kind of motion and one almost nobody ships. Closed form by construction. Each character's weight is a function of its distance from a crest that sweeps the index range, so per-character stagger falls out of the geometry rather than from a separate mechanism. Ships Recursive, subset to the two axes it uses. Three findings that are not guessable from the diff: Recursive is duplexed, holding one advance width across the whole weight axis by design. A width-delta liveness probe therefore reports a healthy font as dead, so the guard measures rendered ink instead. An ink-only guard would have been a false pass: with the font removed, the fallback family still varies its own ink with weight. The guard needs the font-loaded check too, and a falsifier is what proved that rather than reasoning about it. CRSV defaults to 0.5, which is auto: cursive single-storey letterforms swap in the moment the slant axis goes negative. Under a travelling crest that is a per-character glyph substitution popping on and off, not an interpolation. Pinning it to 0 is a correctness fix, not a size optimisation. Requires the sweep-fingerprint fix to land first; without it the layout audit reports this timeline as static, because font axes were not part of the fingerprint and duplexing removes the last trace.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
3 tasks
Collaborator
Author
|
Superseded by #3116, which carries all five video primitives in one PR as requested. Same commits, same verification; nothing dropped. |
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.
What
weight-wave: a wave of thickness travels along a headline. Letters swell from light to black and lean into the crest, then settle.Depends on #3107. Without it the layout audit reports this timeline as static, for the reason that PR explains.
Why
Every kinetic type move in the catalog animates transform, opacity or a mask. This animates the letterforms themselves, which is a different kind of motion and one almost nobody ships.
How
Closed form by construction. Each character's weight is a function of its distance from a crest that sweeps the index range, so per-character stagger falls out of the geometry rather than needing a separate mechanism. One proxy tween drives the paint; no accumulator, no clock.
Ships Recursive (SIL OFL-1.1), subset to the two axes it uses: 1.79 MB to 76 KB, 217 glyphs, three unused axes pinned. Vendored the same way every existing font-carrying registry item does it, so there is no render-time network fetch.
Three findings that are not guessable from the diff:
Recursive is duplexed.
HAMBURGEFONSTIVmeasures 925.00px at weight 300, 650 and 1000, and identically at slant 0 and -15. It holds one advance width across the whole axis by design. A width-delta liveness probe therefore reports a completely healthy font as dead, which is what the first implementation did. The guard measures rendered ink instead: 15,149 px at weight 300 to 49,020 px at weight 1000.An ink-only guard would have been a false pass. With the font file deleted, the fallback family still varies its own ink with weight (21,699 to 38,057), so ink alone reports the axis live on a completely broken composition. The guard needs
document.fonts.check()as well. A falsifier proved this rather than reasoning about it, and the failure mode it protects against is the silent one: every character renders at the default instance while the page looks fine.CRSVdefaults to 0.5, which is Recursive's "auto". Cursive single-storey letterforms swap in the moment the slant axis goes negative. Under a travelling crest that is a per-character glyph substitution popping on and off, not an interpolation. Pinning it to 0 is a correctness fix, and reads like a routinevarLib.instancerargument in the diff.Axis ranges were read from the binary rather than assumed:
wght 300..1000,slnt -15..0. Variable bounds match exactly, so no slider offers a value the font cannot render.slantdefaults to -12 rather than the -15 axis end, which leaves the control room to travel in both directions.Test plan
hyperframes check(with #3107 applied): 0 errors, layout 0 issues across 9 samples, motion 0, contrast 120/120 AA. Registry item lint 0 errors.oxfmt --checkclean.Per-character rendered
font-variation-settingsread fromgetComputedStyleat eight seek positions. The crest at t=0.75s:400 400 400 400 400 438 588 738 888 963 813 663 513 400 400— a clean triangle, moving one group per sample. Eight frames were rendered and looked at.Determinism: stepping 40 frames to t=1.333 is byte-identical to a direct seek there, and an out-of-order seek (5.5, 2.2, 1.333) matches. Two independent capture runs produced identical SHA-256 for all frames.
Worth knowing
Recursive was chosen over Roboto Flex deliberately, and the duplexing is why. Roboto Flex's line breathed about 10px horizontally as the crest passed, so a centred headline wobbled frame to frame. Recursive's line is dimensionally locked, so crest letters get denser in place rather than shouldering their neighbours aside, which reads as pressure applied to the letterforms rather than as a bold toggle.
Honest caveat: at weight 1000 the counters tighten noticeably to hold the fixed advance. At 132px display that reads as intentional and dense; at small sizes it would clot.
Not covered
The catalog preview assets are not generated; the mdx points at URLs that will 404 until
scripts/upload-docs-images.shruns with the publishing profile. Maintainer step.