UNPKG

flowmolio

Version:

[![Tests](https://github.com/vladvlasov256/flowmolio/actions/workflows/test.yml/badge.svg)](https://github.com/vladvlasov256/flowmolio/actions/workflows/test.yml) [![Coverage](https://codecov.io/gh/vladvlasov256/flowmolio/branch/main/graph/badge.svg)](htt

15 lines (14 loc) 499 B
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[];