mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
split font into fontSize and fontFamily (#1635)
This commit is contained in:
parent
46b574283f
commit
63c10743fb
17 changed files with 240 additions and 116 deletions
|
@ -1,9 +1,9 @@
|
|||
import { measureText } from "../utils";
|
||||
import { measureText, getFontString } from "../utils";
|
||||
import { ExcalidrawTextElement } from "./types";
|
||||
import { mutateElement } from "./mutateElement";
|
||||
|
||||
export const redrawTextBoundingBox = (element: ExcalidrawTextElement) => {
|
||||
const metrics = measureText(element.text, element.font);
|
||||
const metrics = measureText(element.text, getFontString(element));
|
||||
mutateElement(element, {
|
||||
width: metrics.width,
|
||||
height: metrics.height,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue