UNPKG

@manifold-studio/typeface

Version:

Font loading and text-to-3D conversion for Manifold Studio

42 lines 1.2 kB
/** * Font Polygon Classification Utility * * This utility provides a clean interface for classifying font polygons as either * holes (to be subtracted) or solid parts (to be added/unioned). The implementation * can be swapped out without changing calling code. * * Current implementation uses sampling-based overlap detection. */ interface Vec2 { x: number; y: number; } interface Polygon extends Array<Vec2> { } export interface PolygonClassification { index: number; polygon: Polygon; area: number; isHole: boolean; confidence: number; debugInfo?: { overlapRatio?: number; method?: string; sampleCount?: number; containerIndex?: number; }; } /** * Main classification function with stable interface * * @param polygons Array of polygons to classify * @param options Optional configuration for the classifier * @returns Array of classifications, one per input polygon */ export declare function classifyFontPolygons(polygons: Polygon[], options?: { holeThreshold?: number; sampleCount?: number; debug?: boolean; }): PolygonClassification[]; export {}; //# sourceMappingURL=font-polygon-classifier.d.ts.map