Skip to main content

Module mbox

Module mbox 

Source
Expand description

The layout node model — the engine shape the G0-3 ratification froze — and the public output types of the frozen API sketch.

Two layers:

  1. The public output: Layout — flat, positioned PlacedGlyph/PlacedRule/PlacedPath lists in em units, y-up, baseline at 0 — is what consumers (franken_manim’s fmn-tex; fmd’s HTML/PDF renderers) read. Every glyph names its face (multi-face layout is structural: ∑ ∫ ∏ resolve through the math-symbol fallback face) and carries its source span (§11.3 span provenance).
  2. The internal node model: [MBox]/[MNode] — boxes, glue, and kerns, built bottom-up by the Appendix-G constructions and flattened into a Layout at the end. Fixed here (this bead) so the placement mathematics and the extension beads build on one shape.

typeset itself lands with the placement bead (fm-hk9); this module fixes the shapes both sides compile against.

Structs§

FaceId
Identifies one of the faces handed to the engine (an index into the engine’s face list, in construction order). Multi-face layout is structural: face selection is data on every glyph, never a rendering afterthought.
Layout
The final layout of a formula: flat positioned primitives plus overall metrics. Everything is in ems of the base size, y-up, baseline at 0; width spans the whole formula, height rises above the baseline, depth extends below it (a positive number).
PathContour
One closed contour of a drawn path: a start point plus segments; the contour closes back to the start implicitly.
PlacedGlyph
A positioned glyph in the final layout. Units are ems of the base (text-style) size; y is the baseline-relative vertical position, positive up; size is the glyph’s own size factor (1.0 / 0.7 / 0.5 per style).
PlacedPath
A positioned drawn-path construction (parametric delimiters past the glyph-scaling threshold, the drawn radical, braces): quadratic contours in ems, y-up, the same path model franken_manim’s geometry kernel and fmd-font outlines share.
PlacedRule
A positioned rectangular rule (fraction bars, \overlines, radical overbars). x/y name the rule’s left-bottom corner in ems, y-up.

Enums§

PathSeg
One segment of a drawn-path contour.