openpencil/packages/fig/src/node-change/export-runtime.ts
Danila Poyarkov 85c3c8fad1 refactor(fig): own NodeChange export policy
- Move SceneGraph-to-NodeChange conversion, text payload assembly, and blob encoding into @open-pencil/fig\n- Inject core glyph outline lookup through an explicit runtime service\n- Centralize neutral font naming in scene-graph and retain core IO/runtime orchestration
2026-07-18 02:41:35 +03:00

21 lines
452 B
TypeScript

import type { OutlineCommand } from './path-commands'
export interface FigGlyphOutlineMetric {
commands: OutlineCommand[]
x: number
advance: number
}
export interface FigNodeChangeExportRuntime {
getGlyphOutlineMetrics(
family: string,
style: string,
text: string,
fontSize: number
): FigGlyphOutlineMetric[] | null
}
export const EMPTY_EXPORT_RUNTIME: FigNodeChangeExportRuntime = {
getGlyphOutlineMetrics: () => null
}