Browse Source

fix: Replace hard coded font family with const value in addFrameLabelsAsTextElements (#7269)

zsviczian 1 year ago
parent
commit
af6b81df40
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/scene/export.ts

+ 2 - 1
src/scene/export.ts

@@ -15,6 +15,7 @@ import { distance, getFontString } from "../utils";
 import { AppState, BinaryFiles } from "../types";
 import {
   DEFAULT_EXPORT_PADDING,
+  FONT_FAMILY,
   FRAME_STYLE,
   SVG_NS,
   THEME_FILTER,
@@ -105,7 +106,7 @@ const addFrameLabelsAsTextElements = (
       let textElement: Mutable<ExcalidrawTextElement> = newTextElement({
         x: element.x,
         y: element.y - FRAME_STYLE.nameOffsetY,
-        fontFamily: 4,
+        fontFamily: FONT_FAMILY.Assistant,
         fontSize: FRAME_STYLE.nameFontSize,
         lineHeight:
           FRAME_STYLE.nameLineHeight as ExcalidrawTextElement["lineHeight"],