Skip to main content
← Back to kicad-monkey Rust Docs kicad-monkey Rust Crate API Reference

Module text_contours

Module text_contours 

Source

Structs§

TextContour
Ordered contour points preserving the outline callback’s closing edge.
TextContourError
Fail-closed text contour error.
TextContourOutput
Positioned contours plus the final run advance in caller coordinates.
TextContourRequest
One raw text run before alignment, markup, mirroring, or rotation.
TextContourSession
One validated font face, shaped and outlined unhinted, reusable for every run of plain text in it: the font buffer is checked against its declared identity (SHA-256, face, variations) once, when the session is built, not once per run. Each run’s input must name the same identity.

Enums§

TextContourErrorKind
Stable failure categories for native contour composition.

Constants§

OUTLINE_FACE_SCALER
Outline layout profile (the one KiCad’s renderer uses): the truncated 16 * 64 * 1.4 outline face size, in face units per em. Outlines are flattened and hinted on this grid; the requested em scales it to caller units. Any source’s size convention (KiCad’s 1.4 em per text size) is applied by that source’s adapter before a request reaches the realizer.
SUBSCRIPT_FACE_SCALER
Outline layout profile: rounded subscript/superscript face size, round(1433 * 0.64).
SUBSCRIPT_SUPERSCRIPT_SIZE_RATIO
Outline layout profile: subscript/superscript glyph size ratio (KiCad outline_font.h).
SUBSCRIPT_VERTICAL_OFFSET_RATIO
Outline layout profile: subscript baseline offset as a fraction of the styled face size.
SUPERSCRIPT_VERTICAL_OFFSET_RATIO
Outline layout profile: superscript baseline offset as a fraction of the styled face size.
TEXT_BEZIER_ERROR
Outline layout profile: default curve error in outline-face coordinate units.

Functions§

shape_text_contours_a0
Shape and place one plain text run using one reusable outline face.
shape_text_contours_hinted_a0
Shape and place one plain text run using KiCad-compatible embedded hinting.