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

Module text_block_layout

Module text_block_layout 

Source
Expand description

Bounded KiCad multiline, tabbed, and markup outline-text layout.

Structs§

PlainTextLayoutOutput
Plain baseline-local ink and source-owned placement for compact consumers. Contours are a transient metric bridge; callers need not normalize or emit them. Markup, tabs, multiple lines and synthetic faces use the block API.
TextBlockLayoutOutput
Positioned block contours and bounded construction accounting.
TextBlockLayoutRequest
One multiline text request including fake bold/italic synthesis flags.

Constants§

KICAD_OUTLINE_EM_PER_SIZE
KiCad draws an outline (TrueType) text’s em at 1.4 times its authored size (OUTLINE_FONT’s size compensation, so its capitals stand about as tall as the stroke font’s). The shared realizer takes the em; this is the one place KiCad’s size convention meets it.
KICAD_TEXT_INTERLINE_FACTOR
KiCad’s baseline-to-baseline multiplier for outline text.
KICAD_TEXT_OVERBAR_HEIGHT_RATIO
KiCad’s overbar baseline offset as a fraction of the character height.
KICAD_TEXT_TAB_WIDTH_FACTOR
KiCad’s four-character tab stop using an average character width of 0.6.

Functions§

layout_plain_text_hinted_a0
Reuse the native hinted plain-run metrics and block alignment, without an adapter-private copy of baseline, mirror or rotation conventions.
layout_text_block_hinted_a0
Render multiline/tabbed/markup text with one reusable shaping and hinted face.