feat: expose fontfamily and refactor FONT_FAMILY (#3710)
* feat: expose fontfamily and refactor FONT_FAMILY for better readability * fix * fix * fix * docs * fix
This commit is contained in:
@ -1,15 +1,16 @@
|
||||
import * as restore from "../../data/restore";
|
||||
import {
|
||||
ExcalidrawTextElement,
|
||||
ExcalidrawElement,
|
||||
ExcalidrawFreeDrawElement,
|
||||
ExcalidrawLinearElement,
|
||||
ExcalidrawElement,
|
||||
ExcalidrawTextElement,
|
||||
} from "../../element/types";
|
||||
import * as sizeHelpers from "../../element/sizeHelpers";
|
||||
import { API } from "../helpers/api";
|
||||
import { getDefaultAppState } from "../../appState";
|
||||
import { ImportedDataState } from "../../data/types";
|
||||
import { NormalizedZoomValue } from "../../types";
|
||||
import { FONT_FAMILY } from "../../constants";
|
||||
|
||||
const mockSizeHelper = jest.spyOn(sizeHelpers, "isInvisiblySmallElement");
|
||||
|
||||
@ -49,7 +50,7 @@ describe("restoreElements", () => {
|
||||
const textElement = API.createElement({
|
||||
type: "text",
|
||||
fontSize: 14,
|
||||
fontFamily: 1,
|
||||
fontFamily: FONT_FAMILY.Virgil,
|
||||
text: "text",
|
||||
textAlign: "center",
|
||||
verticalAlign: "middle",
|
||||
|
Reference in New Issue
Block a user