Skip to main content

cranpose_text/
lib.rs

1#![doc = include_str!("../README.md")]
2
3/// Styled text: spans, links and string annotations.
4pub mod annotated_string;
5mod ascii_breaks;
6/// The embedding levels of the Unicode bidirectional algorithm.
7pub mod bidi_level;
8mod break_leads;
9mod cluster_widths;
10mod coverage;
11/// Text decorations (underline, line through) and text shadows.
12pub mod decoration;
13mod ellipsis_at;
14/// Font weight, style, family and synthesis settings.
15pub mod font;
16mod font_fallback;
17/// Which typeface draws each part of a text: Compose's `FontFamily.Resolver`
18/// with Android's fallback rules.
19pub mod font_family_resolver;
20/// OpenType feature settings, Compose's `fontFeatureSettings`.
21pub mod font_feature;
22/// Glyph indices.
23pub mod glyph_id;
24mod glyph_ink;
25/// Glyph outlines drawn as coverage.
26pub mod glyph_outline;
27#[cfg(feature = "hyphenation")]
28pub mod hyphenator;
29mod index_range;
30/// Splitting text into the items a shaper takes.
31pub mod itemizer;
32mod laid_glyphs;
33mod layout_body;
34/// A paragraph to lay out and the lengths of its style.
35pub mod layout_input;
36/// Options that limit lines, control wrapping and choose the overflow behavior.
37pub mod layout_options;
38pub mod line_box;
39mod line_breaker;
40mod line_hold;
41mod line_runs;
42mod line_text;
43/// Paragraph settings: alignment, direction, line breaking, hyphenation and indent.
44pub mod paragraph;
45mod paragraph_intrinsics;
46mod paragraph_measures;
47mod plain_chars;
48mod plain_glyphs;
49mod plain_kerning;
50/// Writing systems and the script runs of text.
51pub mod script;
52mod script_lookups;
53mod shaped_glyphs;
54mod shaped_item;
55/// Shaping text items into glyphs with HarfRust.
56pub mod shaper;
57/// The stretches of a paragraph that shape alike.
58pub mod shaping_span;
59mod simple_glyf;
60/// Text styles: `SpanStyle`, `ParagraphStyle` and `TextStyle`.
61pub mod style;
62/// The bold and the italic a layout's glyphs ask of faces that lack them.
63pub mod synthesized_style;
64/// A paragraph laid out in lines, and Compose's `TextLayoutResult` queries.
65pub mod text_layout;
66/// Laying paragraphs out in lines.
67pub mod text_layouter;
68/// A font loaded for text: Compose's `Typeface`.
69pub mod typeface;
70/// Text size units: scaled pixels and multiples of the font size.
71pub mod unit;
72/// The words of a text.
73pub mod word_boundary;
74mod word_cache;
75mod word_split;
76
77pub use annotated_string::{
78    AnnotatedString, LinkAnnotation, LinkKey, RangeStyle, RenderString, SpanBoundaries,
79    StringAnnotation,
80};
81pub use bidi_level::BidiLevel;
82pub use decoration::{Shadow, TextDecoration};
83pub use font::{
84    FileBackedFontFamily, FontFamily, FontFile, FontStyle, FontSynthesis, FontWeight,
85    LoadedTypefacePath,
86};
87pub use font_family_resolver::{FontFamilyResolver, FontRequest};
88pub use font_feature::{FontFeature, FontFeatureSettings, font_feature_settings};
89pub use glyph_id::GlyphId;
90pub use glyph_outline::{GlyphOutline, OutlineSegment, OutlineTransform};
91#[cfg(feature = "hyphenation")]
92pub use hyphenator::{HyphenationError, Hyphenator};
93pub use itemizer::{Itemizer, TextItem};
94pub use layout_input::{LayoutInput, ParagraphLengths};
95pub use layout_options::{TextLayoutOptions, TextOptions, TextOverflow};
96pub use line_box::{FontExtent, LineBox, line_box, paragraph_line_box};
97pub use paragraph::{
98    Hyphens, LineBreak, ResolvedTextDirection, TextAlign, TextDirection, TextIndent,
99    resolve_text_direction,
100};
101pub use paragraph_intrinsics::ParagraphIntrinsics;
102pub use script::Script;
103pub use shaped_glyphs::{GlyphOffset, ShapedGlyph, ShapedGlyphs};
104pub use shaper::Shaper;
105pub use shaping_span::ShapingSpan;
106pub use style::{
107    BaselineShift, LineHeightAlignment, LineHeightMode, LineHeightStyle, LineHeightTrim,
108    LocaleList, ParagraphStyle, PlatformParagraphStyle, PlatformSpanStyle, PlatformTextStyle,
109    SpanStyle, TextDrawStyle, TextGeometricTransform, TextMotion, TextShaping, TextStyle,
110};
111pub use synthesized_style::SynthesizedStyle;
112pub use text_layout::{CaretDirection, GlyphRun, PositionedGlyph, TextLayout};
113pub use text_layouter::TextLayouter;
114pub use typeface::{
115    DecorationMetrics, FontBytes, FontFamilyKey, LineMetrics, Synthesis, Typeface, TypefaceError,
116};
117pub use unit::TextUnit;
118pub use word_boundary::word_boundary;