Skip to main content

Module paths

Module paths 

Source
Expand description

Output paths: resolve a Layout into pure quadratic contours, and dump them canonically for goldens.

Glyph outlines come from fmd-font’s glyf decoder — already quadratic — and are scaled from font units to ems and translated to their placed positions; rules become four-line rectangle contours; drawn paths pass through. The result is the shared path model every consumer speaks (franken_manim’s geometry kernel builds VMobjects from it; fmd renders it to HTML/PDF vectors).

Determinism. The transform is pure f64 multiply/add over the decoded integer coordinates, and the canonical dump prints fixed six-decimal fixed-point — same string + faces ⇒ identical bytes, on every platform.

Functions§

canonical_dump
The canonical text dump of resolved contours: one line per element, fixed six-decimal coordinates — the golden format, byte-stable across platforms and runs.
layout_dump
A compact structural dump of a layout (glyph/rule inventory + metrics), for goldens that want placement without full outlines.
resolve_paths
Resolve every primitive of a layout into closed quadratic contours, in ems, y-up, baseline at 0.
spans_cover
Every primitive’s span must sit inside the source string — the §11.3 provenance invariant, checkable by consumers.