diff --git a/app/src-tauri/icons/icon.icns b/app/src-tauri/icons/icon.icns index f950b88..756f820 100644 Binary files a/app/src-tauri/icons/icon.icns and b/app/src-tauri/icons/icon.icns differ diff --git a/app/src-tauri/src/animation/primitives/paint.rs b/app/src-tauri/src/animation/primitives/paint.rs index c8ff099..298d88b 100644 --- a/app/src-tauri/src/animation/primitives/paint.rs +++ b/app/src-tauri/src/animation/primitives/paint.rs @@ -30,6 +30,7 @@ pub struct Paint { pub struct TextPaint { pub style: PaintStyle, pub align: TextAlign, + pub fontName: String, pub size: f32, } diff --git a/app/src-tauri/src/animation/timeline.rs b/app/src-tauri/src/animation/timeline.rs index 617fecc..1d047f8 100644 --- a/app/src-tauri/src/animation/timeline.rs +++ b/app/src-tauri/src/animation/timeline.rs @@ -154,6 +154,7 @@ pub fn test_timeline_entities_at_frame( color: Color::new(0, 0, 0, 1.0), width: 10.0, }), + fontName: "Arial".to_string(), align: TextAlign::Center, size: 20.0, }; @@ -162,6 +163,7 @@ pub fn test_timeline_entities_at_frame( style: PaintStyle::Fill(FillStyle { color: Color::new(0, 0, 0, 1.0), }), + fontName: "Arial".to_string(), align: TextAlign::Center, size: 10.0, }; diff --git a/app/src/App.tsx b/app/src/App.tsx index 70afd6c..756c371 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -20,12 +20,12 @@ export default function App() { }, []); return ( -
+
-
-
+
+
diff --git a/app/src/components/Properties/Primitives.tsx b/app/src/components/Properties/Primitives.tsx index 2f69299..1e086fa 100644 --- a/app/src/components/Properties/Primitives.tsx +++ b/app/src/components/Properties/Primitives.tsx @@ -11,6 +11,7 @@ import { FC } from "react"; import { z } from "zod"; import { AnimatedVec2Properties, ColorProperties } from "./Values"; import { PropertiesProps } from "./common"; +import { useFontsStore } from "stores/fonts.store"; type TextPropertiesProps = PropertiesProps>; type StaggeredTextPropertiesProps = PropertiesProps< @@ -66,6 +67,8 @@ export const TextProperties: FC = ({ entity, onUpdate, }) => { + const { fonts } = useFontsStore(); + return ( = ({ } > + + onUpdate({ ...entity, origin: updatedEntity }) @@ -107,6 +142,8 @@ export const StaggeredTextProperties: FC = ({ entity, onUpdate, }) => { + const { fonts } = useFontsStore(); + return ( = ({ } /> +