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>
14 files changed,
+253
−47
core/src/schema.rs+8 −6core/tests/ops.rs+5 −0fixtures/font-files.mjs+4 −2fixtures/ops.test.mjs+2 −0internal/slides/core/testdata/slides_core.wasmbinaryinternal/slides/core/testdata/slides_core.wasm.stamp+2 −2internal/slides/credits/assets.json+2 −2internal/slides/deck/deck.go+14 −1internal/slides/layout/layout.go+58 −14internal/slides/layout/uploaded_test.go+15 −13internal/slides/layout/weights_test.go+110 −0internal/slides/library.go+7 −6internal/slides/library_alias_test.go+25 −0internal/slides/static/{editor.55a7407f5108ee76.js => editor.1a18c1f5110ed1fa.js}+1 −1
core/src/schema.rsLoading diff…
core/tests/ops.rsLoading diff…
fixtures/font-files.mjsLoading diff…
fixtures/ops.test.mjsLoading diff…
internal/slides/core/testdata/slides_core.wasmLoading diff…
internal/slides/core/testdata/slides_core.wasm.stampLoading diff…
internal/slides/credits/assets.jsonLoading diff…
internal/slides/deck/deck.goLoading diff…
internal/slides/layout/layout.goLoading diff…
internal/slides/layout/uploaded_test.goLoading diff…
internal/slides/layout/weights_test.goLoading diff…
internal/slides/library.goLoading diff…
internal/slides/library_alias_test.goLoading diff…
internal/slides/static/{editor.55a7407f5108ee76.js => editor.1a18c1f5110ed1fa.js}Loading diff…