oficina / slides Public

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>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev e19b49d3e4876238d1ff5aad17cf25c2d45ec1c0 parent 10ee880
23 files changed, +1,316 −98
  • AGENTS.md +17 −1
  • fixtures/deck-fonts.mjs +21 −9
  • fixtures/editor-fonts.mjs +3 −1
  • fixtures/font-families.mjs +62 −8
  • fixtures/font-session.mjs +34 −7
  • fixtures/font-uploaded.test.mjs +180 −0
  • fixtures/fonts-gate.mjs +12 −6
  • fixtures/vectors/font-families.json +494 −1
  • internal/slides/credits/assets.json +2 −2
  • internal/slides/editor.go +1 −1
  • internal/slides/fontgate.go +109 −6
  • internal/slides/presentation.go +1 −1
  • internal/slides/presenter_window.go +1 −1
  • internal/slides/render/families.go +45 −0
  • internal/slides/render/families_test.go +7 −3
  • internal/slides/static/{editor.7522a28e5aa330ba.js => editor.1f4b001e9578d687.js} +17 −17
  • internal/slides/static/fontsgate.09db91091a8e7726.js +0 −1
  • internal/slides/static/fontsgate.56fc9bd74522b27d.js +1 −0
  • internal/slides/templates/layout.html +1 −1
  • internal/slides/viewer.go +1 −1
  • internal/slidestest/fontgate_test.go +162 −11
  • internal/slidestest/fonts_browser_test.go +125 −6
  • internal/slidestest/fonts_test.go +20 −14
AGENTS.md

Loading diff…

fixtures/deck-fonts.mjs

Loading diff…

fixtures/editor-fonts.mjs

Loading diff…

fixtures/font-families.mjs

Loading diff…

fixtures/font-session.mjs

Loading diff…

fixtures/font-uploaded.test.mjs

Loading diff…

fixtures/fonts-gate.mjs

Loading diff…

fixtures/vectors/font-families.json

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/editor.go

Loading diff…

internal/slides/fontgate.go

Loading diff…

internal/slides/presentation.go

Loading diff…

internal/slides/presenter_window.go

Loading diff…

internal/slides/render/families.go

Loading diff…

internal/slides/render/families_test.go

Loading diff…

internal/slides/static/{editor.7522a28e5aa330ba.js => editor.1f4b001e9578d687.js}

Loading diff…

internal/slides/static/fontsgate.09db91091a8e7726.js

Loading diff…

internal/slides/static/fontsgate.56fc9bd74522b27d.js

Loading diff…

internal/slides/templates/layout.html

Loading diff…

internal/slides/viewer.go

Loading diff…

internal/slidestest/fontgate_test.go

Loading diff…

internal/slidestest/fonts_browser_test.go

Loading diff…

internal/slidestest/fonts_test.go

Loading diff…