Skip to content

console: sync to fold-console@f1d5aad49b9c — real font weights - #39

Merged
blakebauman merged 1 commit into
mainfrom
console-sync-fonts
Aug 11, 2026
Merged

blakebauman merged 1 commit into
mainfrom
console-sync-fonts

Conversation

@blakebauman

Copy link
Copy Markdown
Member

Pin bump only. No change to scripts/sync-console.sh's logic, MANIFEST, or
any Go code.

Upstream: fold-run/fold-console#3.

What this fixes

A bug embedded in every fold binary since the console gained webfonts: the
-400 and -600 subsets of each family were byte-identical.

$ md5 gateway/console/fonts/*.woff2        # before
cd5b2578… GeistMono-400-latin.woff2
cd5b2578… GeistMono-600-latin.woff2
d2849889… IBMPlexSans-400-latin.woff2
d2849889… IBMPlexSans-600-latin.woff2

Both copies were the variable font — wght axis intact, defaulting to 400 —
declared in CSS as two static faces. A face declared font-weight: 600 whose
file 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, HVAR and the rest of the
variation tables, so two real weights cost well under half of one duplicated
variable font:

before after
gateway/console total 312,937 241,487

71 KiB off every operator's disk, while gaining a weight the console never
actually had.

Reviewing this

The diff is four .woff2 files and the pin. app.js, style.css and
index.html are 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 MANIFEST and
gateway/introspection_test.go need 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 pin
  • make console-check — gateway/console matches its pin
  • go build ./...
  • go test ./gateway — full package, ok in 8.8s
  • All four embedded font files now have distinct checksums

🤖 Generated with Claude Code

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]>
@blakebauman
blakebauman merged commit 1898110 into main Aug 11, 2026
14 checks passed
@blakebauman

Copy link
Copy Markdown
Member Author

Retrospective verification record

This is not an independent review. Written with Claude Code in the same
session that authored the change, and filed because
.github/workflows/console-sync.yml calls for a human plus a security-auditor
pass on console bumps and neither is recorded here.

The defect this fixed, and how it was established

The -400 and -600 subsets of each family were byte-identical
(md5 gateway/console/fonts/*.woff2 before the bump returned two pairs of
matching digests). Both copies were the variable font with its wght axis
intact and a default of 400, declared in CSS as two static faces, so
font-weight: 600 had no 600 instance to render. Nothing on the console had
ever been bold, and the binary carried each font twice to achieve it.

Verified

  • All four embedded font files now have distinct checksums.
  • usWeightClass reads 400 / 600 respectively; fvar is absent after
    instancing; the B glyph's outline coordinates differ between the two
    (stems start 11 units further out at 600).
  • Rendered in a browser against the built bundle: at 600, IBM Plex Sans lays
    down 34% more ink and Geist Mono 20% more. Ink coverage, not text width —
    a monospace face has the same advance at every weight, so a width comparison
    passed on Geist Mono while proving nothing.
  • gateway/console 312,937 → 241,487 bytes.
  • make console-check, go build ./..., go test ./gateway all clean; CI
    green on all seven jobs.
  • Embedded file set unchanged.

Reasoning worth recording

Shipping each variable font once under a weight range was the obvious
alternative and is worse on both axes: larger (63 KB against 55 KB, because
variation deltas cost more than a second instanced outline set for two weights)
and it changes the file set this repo pins.

Not reviewed

The .woff2 binaries were not inspected beyond the metadata and outline
comparisons above. Provenance is upstream's fonts-src/, which is itself the
previously-shipped subset rather than an upstream master — the original
subsetting is unaudited in both repos.

@blakebauman
blakebauman deleted the console-sync-fonts branch August 13, 2026 16:13
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