diff --git a/app.py b/app.py index b7f4efb..e60da86 100644 --- a/app.py +++ b/app.py @@ -4927,6 +4927,7 @@ class HookRequest(BaseModel): size: Optional[str] = "M" # S, M, L duration_seconds: Optional[float] = None # None = hook visible for the whole clip style: Optional[str] = "pill" # pill/classic/dark/yellow/red/outline/outline_yellow + font: Optional[str] = None # montserrat/anton/serif (hooks.HOOK_FONTS); None = the style's own remove: Optional[bool] = False # strip the burned hook instead of adding one @app.post("/api/hook") @@ -5002,7 +5003,7 @@ async def add_hook(req: HookRequest, request: Request): try: # Run in thread pool def run_hook(): - add_hook_to_video(input_path, req.text, output_path, position=req.position, font_scale=font_scale, duration=req.duration_seconds, style=req.style) + add_hook_to_video(input_path, req.text, output_path, position=req.position, font_scale=font_scale, duration=req.duration_seconds, style=req.style, font=req.font) loop = asyncio.get_event_loop() await loop.run_in_executor(None, run_hook) @@ -5029,7 +5030,7 @@ async def add_hook(req: HookRequest, request: Request): clip_data.pop('auto_hook', None) else: clip_data['auto_hook'] = { - "text": req.text, "style": req.style, "position": req.position, + "text": req.text, "style": req.style, "font": req.font, "position": req.position, "duration_seconds": req.duration_seconds, } diff --git a/dashboard/public/fonts/Anton-Regular.ttf b/dashboard/public/fonts/Anton-Regular.ttf new file mode 100644 index 0000000..4d65707 Binary files /dev/null and b/dashboard/public/fonts/Anton-Regular.ttf differ diff --git a/dashboard/src/components/AutopilotTab.jsx b/dashboard/src/components/AutopilotTab.jsx index 3c387d0..4ce92ab 100644 --- a/dashboard/src/components/AutopilotTab.jsx +++ b/dashboard/src/components/AutopilotTab.jsx @@ -424,8 +424,9 @@ export default function AutopilotTab({ onOpenProject, onUpgrade, justConnected }
Font
+Position
@@ -190,7 +234,8 @@ export default function HookModal({ isOpen, onClose, onGenerate, onRemove, isProEntrance
- This clip re-renders on the server, where the hook is - static — the entrance animation won't apply. -
- )}