Commit Graph
12 Commits
Author SHA1 Message Date
mozempk 4191489995 docs: platform notes - macOS 13 vs 14 split, backend assumptions, issue #121 2026-08-27 09:52:24 +02:00
mozempk 756dd9994e feat(render): Typst renderer, contrast analysis and print pre-flight
render/typst.ts stages each job as a self-contained bundle (<job>/.typst/
lib.typ + template + resolved.json) and roots Typst there, so artwork living
outside the package is reachable and old jobs stay re-renderable. Paths are
root-relative throughout -- Typst resolves a leading / against --root, not
the filesystem.

render/contrast.ts measures the region behind the text with sharp and forces
a scrim on high variance even when mean luminance passes; verified with a
checkerboard that scores 5.45:1 contrast yet stdev 119.9.

render/preflight.ts checks TrimBox, embedded fonts, image dpi and structure,
degrading to 'non installato' rather than failing when a tool is absent.

E2E verified via jiti: TrimBox 297.0x420.0mm, font axes injected, bundle
staged. 0 type errors.
2026-08-27 09:50:22 +02:00
mozempk 0b29c1587d fix(backend): stale classifyImageRunFailure -> classifyRunFailure
Left behind by a rename; broke the img2img (issue #121) crash-detection
path. Typecheck back to 0 errors.
2026-08-27 09:42:01 +02:00
mozempk fd39886168 chore: npm scripts for typecheck/test/fonts; pin tsc as a devDependency 2026-08-27 09:34:11 +02:00
mozempk 5d27417c54 fix(render): resolve ink contrast per surface, not once per poster
templates/lib.typ gains WCAG luminance/contrast-ratio/ink-on and a
surface-aware palette-of(). framed and split place type on flat colour and
were inheriting an ink measured against the artwork, rendering white on
cream at 1.15:1. Now computed per surface: 18.34:1 on the regression
fixture. Accent held to the same bar with fallback to ink.

Adds tests/contrast-check.typ, run per fixture by the harness.
35/35 render combos and 7/7 contrast assertions pass.
2026-08-27 09:33:08 +02:00
mozempk aad8a7fbdf tests: surface-contrast regression fixture (dark art + light bg) 2026-08-27 09:28:26 +02:00
mozempk 5fabf5345f tests: fix root-relative spec path; document ink-surface blocker 2026-08-27 09:25:34 +02:00
mozempk cf7f0aa386 tests: root-relative fixture paths + synthetic artwork 2026-08-27 09:16:48 +02:00
mozempk ae7ffd55b1 tests: golden-file fixture harness (accents, overflow, missing blocks, landscape) 2026-08-27 09:16:26 +02:00
mozempk d2f3d9fda2 docs: README (Italian) and MIT licence with font carve-out 2026-08-27 09:06:58 +02:00
mozempk 2f7db0e4fd docs: record empirically verified Typst behaviour (0.15.1) 2026-08-27 09:06:23 +02:00
mozempk 5a76acdfbc Scaffold: package, contracts (DesignSpec, config, backend, font registry) 2026-08-27 08:58:57 +02:00