fix: replace invalid FFmpeg fontweight param with bold=1 and fix fontfile set to name instead of path#1416
Conversation
…t to name instead of path
|
@abhinav-atul is attempting to deploy a commit to the magic-peach1's projects Team on Vercel. A member of the Team first needs to authorize it. |
👋 Thanks for your PR, @abhinav-atul!Welcome to Reframe — a browser-based video editor built for everyone 🎬
What happens next
Quick checklist
Useful links
Happy coding! 🎉 |
✅ PR Format Check Passed — @abhinav-atulBasic format checks passed. A maintainer will review your code changes. This does not mean the PR is approved — it just means the format is correct. |
|
@magic-peach Hi! The auto-label bot assigned
The issue itself is also labeled as |
Description
Fixes two bugs in
buildTextFilter()insrc/lib/text-overlay.tsthat silently broke bold text rendering and custom font loading in all video exports.Bug A — Invalid
fontweight=parameter:fontweight=is not a valid FFmpegdrawtextoption. FFmpeg silently ignores unknown parameters, so bold text was never rendered bold in any export. Replaced:fontweight=${fontWeightParam}with:bold=1, appended only whenfontWeightParam === "bold". Omitted entirely for normal weight.Bug B —
fontfile=set to font name instead of file path:For any overlay with a
fontFamily, the filter incorrectly appendedfontfile='Arial'(a sanitized font name) instead of a filesystem path. FFmpeg expects a path here, not a name, causing it to silently fail. For custom fonts,getFFmpegFontArgthen appended the realfontfile=path immediately after, producing a duplicatefontfile=key. Removed the block that setfontfile=to a sanitized name. System fonts now usefont='FontFamily'(the correct FFmpeg option). Custom font paths viafontFileParamare appended only when present.Before (broken):
After (correct):
Related Issue
Closes #1414
Type of Contribution
Participant Info
Screen Recording
Recording / Loom link: N/A (non-UI backend logic fix — no visual changes to record)
Checklist
bun run lintpasses (no ESLint errors)bunx tsc --noEmitpasses (no TypeScript errors)aria-label/ accessible namesconsole.logstatements left in