Repository navigation
console: sync to fold-console@f1d5aad49b9c — real font weights - #39
Conversation
Upstream fixed a bug that has been embedded in every fold binary since the console gained webfonts: the -400 and -600 subsets of each family were byte-identical. Both were the variable font with its wght axis intact and a default of 400, declared in CSS as two static faces — so a face declared `font-weight: 600` had no 600 instance to render, nothing on the page was ever bold, and the binary carried each font twice to achieve that. Instancing at each declared weight drops gvar, HVAR and the rest of the variation tables, so two real weights now cost well under half of one duplicated variable font. gateway/console shrinks 312937 -> 241487 bytes, a 71 KiB reduction on every operator's disk, while gaining a weight it never actually had. Only the fonts and the pin move here. app.js, style.css and index.html are byte-identical — upstream's change was to the font pipeline, its CI and its docs, and the one source comment it touched is stripped by the minifier. The embedded file set is unchanged, so MANIFEST and introspection_test.go need no edit. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Retrospective verification recordThis is not an independent review. Written with Claude Code in the same The defect this fixed, and how it was establishedThe Verified
Reasoning worth recordingShipping each variable font once under a weight range was the obvious Not reviewedThe |
Pin bump only. No change to
scripts/sync-console.sh's logic,MANIFEST, orany Go code.
Upstream: fold-run/fold-console#3.
What this fixes
A bug embedded in every fold binary since the console gained webfonts: the
-400and-600subsets of each family were byte-identical.Both copies were the variable font — wght axis intact, defaulting to 400 —
declared in CSS as two static faces. A face declared
font-weight: 600whosefile carries no 600 instance renders the outlines it has, so nothing on the
console has ever actually been bold, and the binary carried each font twice to
achieve that.
Instancing at each declared weight drops
gvar,HVARand the rest of thevariation tables, so two real weights cost well under half of one duplicated
variable font:
gateway/consoletotal71 KiB off every operator's disk, while gaining a weight the console never
actually had.
Reviewing this
The diff is four
.woff2files and the pin.app.js,style.cssandindex.htmlare byte-identical — upstream's change was to its font pipeline,its CI and its docs, and the one source comment it touched is stripped by the
minifier. So there is no behavioural change to audit here beyond the glyphs.
The embedded file set is unchanged, so
MANIFESTandgateway/introspection_test.goneed no edit.Upstream verified the weights render in a browser against the built bundle —
at 600, IBM Plex Sans lays down 34% more ink and Geist Mono 20% more — and now
fails its own CI if any two shipped font files are ever identical again.
Verification
./scripts/sync-console.sh— vendors 8 files, writes the pinmake console-check—gateway/console matches its pingo build ./...go test ./gateway— full package,okin 8.8s🤖 Generated with Claude Code