Skip to main content

Crate oxitext_layout

Crate oxitext_layout 

Source
Expand description

oxitext-layout — Text layout for OxiText.

Provides SimpleLayouter, a left-to-right cursor-advance layouter that wraps lines when the current cursor exceeds max_width.

M1: LTR simple layout. M2: bidi (UAX #9), linebreak (UAX #14), vertical (UAX #50 subset). M3 (deferred): Parley integration for full rich-text layout. M4: tate_chu_yoko — horizontal run detection within vertical CJK lines. M6: engine — word-aware (linebreak-driven) wrapping with horizontal oxitext_core::TextAlignment and structured engine::LayoutResult output (per-line and per-paragraph metrics).

Re-exports§

pub use engine::BreakingStrategy;
pub use engine::LayoutEngine;
pub use engine::LayoutResult;
pub use engine::Line;
pub use engine::LineMetrics;
pub use engine::ParagraphMetrics;
pub use hyphenation::soft_hyphen_breaks;
pub use options::LayoutOptions;
pub use options::LayoutOptionsBuilder;
pub use options::TabStops;
pub use options::TruncationMode;
pub use reorder::needs_bidi;
pub use ruby::layout_ruby;
pub use ruby::RubyAnnotation;
pub use ruby::RubyLayout;
pub use ruby::RubyPosition;
pub use styled::StyledRun;
pub use tate_chu_yoko::detect_runs;
pub use tate_chu_yoko::tcy_combined_advance;
pub use tate_chu_yoko::GlyphEntry;
pub use tate_chu_yoko::TateChuYokoRun;
pub use vertical::vmtx_advance_for_glyph;

Modules§

bidi
UAX #9 Unicode Bidirectional Algorithm.
engine
Rich line-aware layout engine.
hyphenation
Hyphenation support: soft-hyphen detection and automatic hyphenation.
knuth_plass
Knuth-Plass optimal paragraph line-breaking algorithm.
linebreak
UAX #14 Unicode Line Breaking Algorithm.
options
Layout options and configuration for crate::engine::LayoutEngine.
reorder
UAX #9 bidi visual reordering helpers.
ruby
Ruby annotation layout for CJK furigana and phonetic glosses.
styled
Multi-style layout: baseline-aligned layout across StyledRuns.
tate_chu_yoko
Tate-chu-yoko: horizontal runs within vertical text.
vertical
Vertical text orientation utilities — basic UAX #50 subset.

Structs§

DecorationRect
A positioned decoration rectangle ready to be composited onto the output canvas.
InlineObject
An inline object (image, custom widget) that can be positioned inline with text. The layout engine treats it as a glyph with known advance and baseline offset.
PositionedInlineObject
A positioned inline object from a layout pass.
SimpleLayouter
Simple layouter that supports both horizontal (LTR) and vertical flow.

Enums§

TextDecoration
A text decoration style applied to a run of text.
VerticalPosition
Vertical text positioning for subscript/superscript effects.