From 05f4e74de6b058ad13395dfd9bfe5a36089a3549 Mon Sep 17 00:00:00 2001 From: Siddharth Date: Fri, 6 Feb 2026 21:58:07 -0800 Subject: [PATCH] google fonts --- src/App.tsx | 6 + src/components/ui/dialog.tsx | 4 +- src/components/ui/input.tsx | 24 +++ src/components/ui/label.tsx | 23 +++ .../video-editor/AddCustomFontDialog.tsx | 181 ++++++++++++++++++ .../video-editor/AnnotationSettingsPanel.tsx | 43 ++++- src/lib/customFonts.ts | 178 +++++++++++++++++ 7 files changed, 453 insertions(+), 6 deletions(-) create mode 100644 src/components/ui/input.tsx create mode 100644 src/components/ui/label.tsx create mode 100644 src/components/video-editor/AddCustomFontDialog.tsx create mode 100644 src/lib/customFonts.ts diff --git a/src/App.tsx b/src/App.tsx index 3ba8213..ad94efb 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,6 +2,7 @@ import { useEffect, useState } from "react"; import { LaunchWindow } from "./components/launch/LaunchWindow"; import { SourceSelector } from "./components/launch/SourceSelector"; import VideoEditor from "./components/video-editor/VideoEditor"; +import { loadAllCustomFonts } from "./lib/customFonts"; export default function App() { const [windowType, setWindowType] = useState(''); @@ -15,6 +16,11 @@ export default function App() { document.documentElement.style.background = 'transparent'; document.getElementById('root')?.style.setProperty('background', 'transparent'); } + + // Load custom fonts on app initialization + loadAllCustomFonts().catch((error) => { + console.error('Failed to load custom fonts:', error); + }); }, []); switch (windowType) { diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx index 9dbeaa0..213f877 100644 --- a/src/components/ui/dialog.tsx +++ b/src/components/ui/dialog.tsx @@ -19,7 +19,7 @@ const DialogOverlay = React.forwardRef< {} + +const Input = React.forwardRef( + ({ className, type, ...props }, ref) => { + return ( + + ) + } +) +Input.displayName = "Input" + +export { Input } diff --git a/src/components/ui/label.tsx b/src/components/ui/label.tsx new file mode 100644 index 0000000..f918cb2 --- /dev/null +++ b/src/components/ui/label.tsx @@ -0,0 +1,23 @@ +import * as React from "react" +import { cn } from "@/lib/utils" + +export interface LabelProps + extends React.LabelHTMLAttributes {} + +const Label = React.forwardRef( + ({ className, ...props }, ref) => { + return ( +