Skip to main content

incular_text/
lib.rs

1//! Renderer-independent text primitives and cached logical text layout.
2//!
3//! The public surface is split into small modules so consumers can use the
4//! text model (`spans`), editor state (`editing`), and shaping engine
5//! independently. Existing font/layout exports remain available at the crate
6//! root for backwards compatibility.
7mod boundary;
8mod editing;
9mod spans;
10mod style;
11
12pub use boundary::{TextBoundaryKind, is_layout_whitespace, set_word_segmenter, word_boundary_at};
13pub use editing::{
14    ComposingRange, EditableText, SelectionChangedCause, TextAffinity, TextEditingController,
15    TextEditingDelta, TextEditingSubscription, TextEditingValue, TextField, TextRange,
16    TextSelection,
17};
18pub use spans::{
19    InlineSpan, RichText, Text, TextSpan, TextSpanVisitor, WidgetSpan, WidgetSpanAlignment,
20};
21pub use style::{
22    FontFamily, FontFeature, FontStyle, FontVariation, FontWeight, IconData, LineHeight,
23    StrutStyle, TextAlign, TextBaseline, TextDecoration, TextDecorationStyle, TextHeightBehavior,
24    TextLeadingDistribution, TextOverflow, TextScaler, TextScalerKind, TextShadow, TextStyle,
25    TextWidthBasis,
26};
27
28mod engine;
29pub use engine::{
30    FontId, FontRunDebug, TextCaretPosition, TextClusterSpan, TextDiagnostics, TextDocumentLayout,
31    TextEngine, TextLayout, TextLayoutOptions, TextLine, TextMetrics, register_application_font,
32    set_missing_characters_listener, take_missing_characters,
33};
34mod geometry;
35pub use geometry::{TextGeometry, TextLineRef, TextLines};