import type { LayoutElement } from "../layoutElement.js"; import type { Size } from "@hylimo/diagram-common"; import { Text } from "@hylimo/diagram-common"; import type { FontCollection } from "./fontCollection.js"; /** * Result of a text layout process */ export interface TextLayoutResult { /** * Required size for the text elements */ size: Size; /** * Layout result with position (0,0) */ elements: Text[]; } /** * Layouts all spans of a text element. * In the future, this may cache results */ export declare class TextLayouter { /** * Layouts a text element * * @param text the element to layout * @param fonts all known fonts * @param maxWidth the max width * @returns the size it needs */ layout(text: LayoutElement, fonts: FontCollection, maxWidth: number): TextLayoutResult; } //# sourceMappingURL=textLayouter.d.ts.map