- 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
21 lines
452 B
TypeScript
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
|
|
}
|