import { BufferGeometry } from 'three'; type TextAlign = 'left' | 'center' | 'right'; interface TextOptions { /** Cap height in metres. Default 0.5. */ size?: number; /** Stroke width as a fraction of cap height. Default 0.22 (bold, signage-weight). */ weight?: number; /** Relief depth in metres (how far the letters stand off the board). Default size*0.12. */ depth?: number; /** Extra gap between letters, in grid units. Default 0.6. */ tracking?: number; /** Horizontal anchor. Default 'center'. */ align?: TextAlign; /** Vertical placement: 'baseline' puts y=0 at the baseline; 'center' centres the cap band on y=0. Default 'center'. */ baseline?: 'baseline' | 'center'; } interface TextGeometry { geometry: BufferGeometry; /** Total advance width in metres. */ width: number; /** Cap height in metres. */ height: number; } /** * Turn a string into a single carved-relief `BufferGeometry`. Each polyline * stroke of the vector font becomes a **solid, constant-width ribbon** with * mitred corners — the way a bold typeface is drawn — extruded into a shallow * slab (front face, side walls and a back face) and merged into one draw call. * Butt ends are extended by half a stroke so crossing strokes (the bar of an H, * the arms of an E) weld into a solid joint instead of cracking open. * * It's pure geometry built from the embedded font, so it renders the same in a * browser, a headless capture and a Node test — no textures, no font files, no * loaders. The result sits in the XY plane facing +Z, ready to lay onto a * board; origin follows `align` (default centred) and `baseline` (default the * cap band centred on y=0). */ declare function buildTextGeometry(text: string, options?: TextOptions): TextGeometry; /** Measure a string without building geometry (metres). */ declare function measureText(text: string, options?: TextOptions): number; export { type TextAlign, type TextGeometry, type TextOptions, buildTextGeometry, measureText };