import { Vec2 } from "../math/Vec2"; import { TextAlign } from "../layout/styling"; import type { Lookups } from "./types"; export declare const ENABLE_KERNING = true; export type Shape = { boundingRectangle: { height: number; width: number; }; positions: Array; sizes: Array; }; /** * The most important function for getting text on the screen. Given a string and font data, finds * the positions and sizes of each character. * * @param lookups metadata of fonts. * @param fontName name of the font. * @param fontSize size of the font in pixels. * @param lineHeight height of a line in pixels. * @param text text to shape. * @param textAlign alignment of the text. * @param maxWidth maximum width of the text. If the text is longer than this, it will be wrapped. Defaults to `Number.POSITIVE_INFINITY`. * @param noWrap if true, the text will not be wrapped. * @returns a shape object that can be used to render the text. */ export declare function shapeText(lookups: Lookups, fontName: string, fontSize: number, lineHeight: number, text: string, textAlign: TextAlign, maxWidth?: number, noWrap?: boolean): Shape;