Expand description
Bounded no_std Unicode text layout and shaping.
TextFlow provides borrowed line layout with explicit width, height, and spacing metrics.
The optional shaping pipeline adds bidirectional text, font fallback, safe line breaking,
positioned glyphs, visual runs, and caret positions through caller-owned buffers.
§Line layout
use textflow::TextFlow;
let text = "A small UI can still set type well.";
let lines = TextFlow::new(text, 12)
.map(|line| line.text())
.collect::<Vec<_>>();
assert_eq!(lines, ["A small UI", "can still", "set type", "well."]);Re-exports§
pub use crate::layout::Alignment;pub use crate::layout::LayoutError;pub use crate::layout::LayoutScratch;pub use crate::layout::Overflow;pub use crate::layout::ParagraphLayout;pub use crate::layout::WrapMode;pub use crate::shaping::scripts;
Modules§
- bidi
- layout
- placement
- Allocation-free placement of linear paragraph output on sampled baselines.
- shaping
- unicode
- workspace