@manifold-studio/typeface
Version:
Font loading and text-to-3D conversion for Manifold Studio
25 lines • 863 B
TypeScript
/**
* Text Renderer - Convert text to 3D CrossSection using fonts
*
* This module handles the conversion of text strings to 2D polygon arrays
* that can be used with ManifoldCAD's CrossSection for 3D extrusion.
*/
import { type CrossSectionType } from '@manifold-studio/wrapper';
/**
* Text rendering options
*/
export interface TextRenderOptions {
/** Font size in units */
fontSize?: number;
/** Letter spacing multiplier (1.0 = normal) */
letterSpacing?: number;
/** Horizontal alignment */
align?: 'left' | 'center' | 'right';
/** Bezier curve subdivision steps */
subdivisionSteps?: number;
}
/**
* Convert text to CrossSection using a loaded font
*/
export declare function textToCrossSection(text: string, fontName: string, options?: TextRenderOptions): CrossSectionType;
//# sourceMappingURL=text-renderer.d.ts.map