Deterministic subtitle renderer for web and Bun with libass-style parity goals
npm install subframe




Subframe is a subtitle renderer that renders Subforge SubtitleDocument directly and targets libass visual parity for ASS/SSA on web and Bun. The core is CPU-rendered and deterministic; GPU backends only composite bitmaps.
docs/GOALS.md.
bun playground/index.html
`
Default backend selection order: WebGPU → WebGL → CPU.Build
`
bun run build
`
Outputs ESM bundle to dist/.Parity quickstart (smoke)
1) Build libass (submodule): tools/ref/build_libass.sh
2) Build the render helper (see tools/ref/README.md)
3) Run the smoke parity test:
`
bun run test:golden:smoke -- --trace-on-fail
`Repository layout
`
src/ # Renderer core + backends
playground/ # Local demo UI
docs/ # Goals, architecture, perf notes
tools/ # Parity and diff tooling
test/ # Fixtures and golden data
refs/ # Reference submodules (libass, subforge, text-shaper)
`Submodules
This repo uses reference submodules for implementation parity research:
`
git submodule update --init --recursive
`
See refs/README.md for details.License
MIT. See LICENSE`.