diff --git a/src/actions/actionProperties.tsx b/src/actions/actionProperties.tsx
index 45756dca..e3d28a25 100644
--- a/src/actions/actionProperties.tsx
+++ b/src/actions/actionProperties.tsx
@@ -13,6 +13,13 @@ import {
FillCrossHatchIcon,
FillHachureIcon,
FillSolidIcon,
+ FontFamilyCodeIcon,
+ FontFamilyHandDrawnIcon,
+ FontFamilyNormalIcon,
+ FontSizeExtraLargeIcon,
+ FontSizeLargeIcon,
+ FontSizeMediumIcon,
+ FontSizeSmallIcon,
SloppinessArchitectIcon,
SloppinessArtistIcon,
SloppinessCartoonistIcon,
@@ -20,18 +27,15 @@ import {
StrokeStyleDottedIcon,
StrokeStyleSolidIcon,
StrokeWidthIcon,
- FontSizeSmallIcon,
- FontSizeMediumIcon,
- FontSizeLargeIcon,
- FontSizeExtraLargeIcon,
- FontFamilyHandDrawnIcon,
- FontFamilyNormalIcon,
- FontFamilyCodeIcon,
- TextAlignLeftIcon,
TextAlignCenterIcon,
+ TextAlignLeftIcon,
TextAlignRightIcon,
} from "../components/icons";
-import { DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE } from "../constants";
+import {
+ DEFAULT_FONT_FAMILY,
+ DEFAULT_FONT_SIZE,
+ FONT_FAMILY,
+} from "../constants";
import {
getNonDeletedElements,
isTextElement,
@@ -44,7 +48,7 @@ import {
ExcalidrawElement,
ExcalidrawLinearElement,
ExcalidrawTextElement,
- FontFamily,
+ FontFamilyValues,
TextAlign,
} from "../element/types";
import { getLanguage, t } from "../i18n";
@@ -499,19 +503,23 @@ export const actionChangeFontFamily = register({
};
},
PanelComponent: ({ elements, appState, updateData }) => {
- const options: { value: FontFamily; text: string; icon: JSX.Element }[] = [
+ const options: {
+ value: FontFamilyValues;
+ text: string;
+ icon: JSX.Element;
+ }[] = [
{
- value: 1,
+ value: FONT_FAMILY.Virgil,
text: t("labels.handDrawn"),
icon: ,
},
{
- value: 2,
+ value: FONT_FAMILY.Helvetica,
text: t("labels.normal"),
icon: ,
},
{
- value: 3,
+ value: FONT_FAMILY.Cascadia,
text: t("labels.code"),
icon: ,
},
@@ -520,7 +528,7 @@ export const actionChangeFontFamily = register({
return (