oficina / slides Public

Fonts: one alias pattern; a static face chosen for a weight as CSS does

A face weighing 500 was marked for pictures yet never used: layout
took only faces covering exactly 400 or 700. And the library made
names like "_Brand" that layout would not draw (final review, I5).

deck.FontCSSName is now the one CSS-name pattern: the library makes
names by it, core and fixtures take only names that match it (no
leading punctuation, no comma or quote), and layout draws them.
Layout picks a static face for regular and bold as CSS font matching
does (400, up to 500, lighter, heavier; bold: 700 up, then lighter).
A bold with no bold face is measured in the face CSS chose, whose
advances a browser keeps when it thickens it; pictures still do not
thicken it. Wasm, bundles and credits rebuilt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev f9b65206f9dc107f9f82d8fe316c46e5ec5a615e parent 08185bd
14 files changed, +253 −47
  • core/src/schema.rs +8 −6
  • core/tests/ops.rs +5 −0
  • fixtures/font-files.mjs +4 −2
  • fixtures/ops.test.mjs +2 −0
  • internal/slides/core/testdata/slides_core.wasm binary
  • internal/slides/core/testdata/slides_core.wasm.stamp +2 −2
  • internal/slides/credits/assets.json +2 −2
  • internal/slides/deck/deck.go +14 −1
  • internal/slides/layout/layout.go +58 −14
  • internal/slides/layout/uploaded_test.go +15 −13
  • internal/slides/layout/weights_test.go +110 −0
  • internal/slides/library.go +7 −6
  • internal/slides/library_alias_test.go +25 −0
  • internal/slides/static/{editor.55a7407f5108ee76.js => editor.1a18c1f5110ed1fa.js} +1 −1
core/src/schema.rs

Loading diff…

core/tests/ops.rs

Loading diff…

fixtures/font-files.mjs

Loading diff…

fixtures/ops.test.mjs

Loading diff…

internal/slides/core/testdata/slides_core.wasm

Loading diff…

internal/slides/core/testdata/slides_core.wasm.stamp

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/deck/deck.go

Loading diff…

internal/slides/layout/layout.go

Loading diff…

internal/slides/layout/uploaded_test.go

Loading diff…

internal/slides/layout/weights_test.go

Loading diff…

internal/slides/library.go

Loading diff…

internal/slides/library_alias_test.go

Loading diff…

internal/slides/static/{editor.55a7407f5108ee76.js => editor.1a18c1f5110ed1fa.js}

Loading diff…