Fonts: the gate waits for a deck's uploaded fonts
The font manifest gains `uploaded`, every family of meta.fontFiles keyed
"u:" + css, with each face at the surface's own base ({base}/fonts/{ref}:
/d/{sqid}, /s/{token}, /p/{session}), its CSS format() and, for a variable
face, its weight range as "min max". It is left out when a deck has no
fonts of its own, so an existing deck's manifest is byte for byte what it
was (tested against the old shape). newFontGate takes the base; the
editor, viewer, projector, follow view and presenter window pass theirs.
render.UploadedUsed (and familiesOfView's "u:" keys) names the uploaded
families a heading or body stack leads with; the gate needs and
preloads those (typed preloads), under the same deadline, and commits a
late one to its stack's next family. familiesOfSection reads them off a
rendered slide, so the stage, projector and presenter window wait too.
FontFace gets the name unquoted: it takes it literally. A family picked
in Deck settings during the visit is learned from the server's answer
unless a stack already leads with it, so the pick waits for its faces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 files changed,
+1,316
−98
AGENTS.md+17 −1fixtures/deck-fonts.mjs+21 −9fixtures/editor-fonts.mjs+3 −1fixtures/font-families.mjs+62 −8fixtures/font-session.mjs+34 −7fixtures/font-uploaded.test.mjs+180 −0fixtures/fonts-gate.mjs+12 −6fixtures/vectors/font-families.json+494 −1internal/slides/credits/assets.json+2 −2internal/slides/editor.go+1 −1internal/slides/fontgate.go+109 −6internal/slides/presentation.go+1 −1internal/slides/presenter_window.go+1 −1internal/slides/render/families.go+45 −0internal/slides/render/families_test.go+7 −3internal/slides/static/{editor.7522a28e5aa330ba.js => editor.1f4b001e9578d687.js}+17 −17internal/slides/static/fontsgate.09db91091a8e7726.js+0 −1internal/slides/static/fontsgate.56fc9bd74522b27d.js+1 −0internal/slides/templates/layout.html+1 −1internal/slides/viewer.go+1 −1internal/slidestest/fontgate_test.go+162 −11internal/slidestest/fonts_browser_test.go+125 −6internal/slidestest/fonts_test.go+20 −14
AGENTS.mdLoading diff…
fixtures/deck-fonts.mjsLoading diff…
fixtures/editor-fonts.mjsLoading diff…
fixtures/font-families.mjsLoading diff…
fixtures/font-session.mjsLoading diff…
fixtures/font-uploaded.test.mjsLoading diff…
fixtures/fonts-gate.mjsLoading diff…
fixtures/vectors/font-families.jsonLoading diff…
internal/slides/credits/assets.jsonLoading diff…
internal/slides/editor.goLoading diff…
internal/slides/fontgate.goLoading diff…
internal/slides/presentation.goLoading diff…
internal/slides/presenter_window.goLoading diff…
internal/slides/render/families.goLoading diff…
internal/slides/render/families_test.goLoading diff…
internal/slides/static/{editor.7522a28e5aa330ba.js => editor.1f4b001e9578d687.js}Loading diff…
internal/slides/static/fontsgate.09db91091a8e7726.jsLoading diff…
internal/slides/static/fontsgate.56fc9bd74522b27d.jsLoading diff…
internal/slides/templates/layout.htmlLoading diff…
internal/slides/viewer.goLoading diff…
internal/slidestest/fontgate_test.goLoading diff…
internal/slidestest/fonts_browser_test.goLoading diff…
internal/slidestest/fonts_test.goLoading diff…