diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-02-08 16:50:31 +0100 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-02-08 16:50:31 +0100 |
| commit | c6666fd385588f11d6ec887455a115d525e2e6c2 (patch) | |
| tree | 08a142946f27eb70854a791165cd00ad9693678c /apps/web/src/constants | |
| parent | 9b5fd6eb077a3fb2380f42414b65405030a01fcd (diff) | |
| download | opencut-c6666fd385588f11d6ec887455a115d525e2e6c2.tar.gz | |
feat: update text properties to use dynamic font size limits and scaling
Diffstat (limited to 'apps/web/src/constants')
| -rw-r--r-- | apps/web/src/constants/text-constants.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/web/src/constants/text-constants.ts b/apps/web/src/constants/text-constants.ts index c8a23655..932d494b 100644 --- a/apps/web/src/constants/text-constants.ts +++ b/apps/web/src/constants/text-constants.ts @@ -1,11 +1,20 @@ import type { TextElement } from "@/types/timeline";
import { TIMELINE_CONSTANTS } from "./timeline-constants";
+export const MIN_FONT_SIZE = 5;
+export const MAX_FONT_SIZE = 300;
+
+/**
+ * higher value: smaller font size
+ * lower value: larger font size
+ */
+export const FONT_SIZE_SCALE_REFERENCE = 90;
+
export const DEFAULT_TEXT_ELEMENT: Omit<TextElement, "id"> = {
type: "text",
name: "Text",
content: "Default Text",
- fontSize: 48,
+ fontSize: 15,
fontFamily: "Arial",
color: "#ffffff",
backgroundColor: "transparent",
|
