flowmolio
Version:
[](https://github.com/vladvlasov256/flowmolio/actions/workflows/test.yml) [](htt
15 lines (14 loc) • 499 B
TypeScript
export interface FontConfig {
fontFamily: string;
fontSize: number;
fontWeight?: string | number;
letterSpacing?: number;
lineSpacing?: number;
}
export interface TspanData {
x: number;
y: number;
text: string;
}
export declare function breakTextIntoLines(text: string, maxWidth: number, fontConfig: FontConfig): string[];
export declare function generateTspans(lines: string[], startX: number, startY: number, lineHeight: number, lineSpacing?: number): TspanData[];