Add Custom Fonts to the OpenCut Editor
OpenCut uses Tailwind and a shared font registry to render text consistently.
Steps
- Copy the font files:
mkdir -p apps/web/public/fonts cp ~/Downloads/NeonStream.woff2 apps/web/public/fonts/neon-stream.woff2 - Register in
tailwind.config.ts:extend: { fontFamily: { neon: ['"NeonStream"', 'cursive'] } } - Add an
@font-facerule (apps/web/styles/fonts.css):@font-face { font-family: 'NeonStream'; src: url('/fonts/neon-stream.woff2') format('woff2'); font-display: swap; } - Import the CSS in
_app.tsxorglobals.css:import '../styles/fonts.css'; - Preload in the editor font registry (e.g.,
apps/web/src/lib/fonts.ts):fontRegistry.load('NeonStream', '/fonts/neon-stream.woff2');
Diagram
flowchart TD
A[public/fonts] --> B[@font-face]
B --> C[Tailwind classes]
C --> D[Timeline canvas]
Commit the font assets so deployments (Vercel, Docker) ship with identical typography.