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;
27mod glyph_scratch;
28#[cfg(feature = "hyphenation")]
29pub mod hyphenator;
30mod index_range;
31/// Splitting text into the items a shaper takes.
32pub mod itemizer;
33mod laid_glyphs;
34mod layout_body;
35/// A paragraph to lay out and the lengths of its style.
36pub mod layout_input;
37/// Options that limit lines, control wrapping and choose the overflow behavior.
38pub mod layout_options;
39pub mod line_box;
40mod line_breaker;
41mod line_hold;
42mod line_runs;
43mod line_text;
44/// Paragraph settings: alignment, direction, line breaking, hyphenation and indent.
45pub mod paragraph;
46mod paragraph_intrinsics;
47mod paragraph_measures;
48mod plain_chars;
49mod plain_glyphs;
50mod plain_kerning;
51/// What texts gave up, kept for the texts that change next.
52pub mod retired;
53/// Writing systems and the script runs of text.
54pub mod script;
55mod script_lookups;
56mod shaped_glyphs;
57mod shaped_item;
58/// Shaping text items into glyphs with HarfRust.
59pub mod shaper;
60/// The stretches of a paragraph that shape alike.
61pub mod shaping_span;
62mod simple_glyf;
63/// Text styles: `SpanStyle`, `ParagraphStyle` and `TextStyle`.
64pub mod style;
65/// The bold and the italic a layout's glyphs ask of faces that lack them.
66pub mod synthesized_style;
67/// A paragraph laid out in lines, and Compose's `TextLayoutResult` queries.
68pub mod text_layout;
69/// Laying paragraphs out in lines.
70pub mod text_layouter;
71/// A font loaded for text: Compose's `Typeface`.
72pub mod typeface;
73/// Text size units: scaled pixels and multiples of the font size.
74pub mod unit;
75/// The words of a text.
76pub mod word_boundary;
77mod word_cache;
78mod word_split;
79
80pub use annotated_string::{
81    AnnotatedString, LinkAnnotation, LinkKey, RangeStyle, RenderString, SpanBoundaries,
82    StringAnnotation,
83};
84pub use bidi_level::BidiLevel;
85pub use decoration::{Shadow, TextDecoration};
86pub use font::{
87    FileBackedFontFamily, FontFamily, FontFile, FontStyle, FontSynthesis, FontWeight,
88    LoadedTypefacePath,
89};
90pub use font_family_resolver::{FontFamilyResolver, FontRequest};
91pub use font_feature::{FontFeature, FontFeatureSettings, font_feature_settings};
92pub use glyph_id::GlyphId;
93pub use glyph_outline::{GlyphOutline, OutlineSegment, OutlineTransform};
94#[cfg(feature = "hyphenation")]
95pub use hyphenator::{HyphenationError, Hyphenator};
96pub use itemizer::{Itemizer, TextItem};
97pub use layout_input::{LayoutInput, ParagraphLengths};
98pub use layout_options::{TextLayoutOptions, TextOptions, TextOverflow};
99pub use line_box::{FontExtent, LineBox, line_box, paragraph_line_box};
100pub use paragraph::{
101    Hyphens, LineBreak, ResolvedTextDirection, TextAlign, TextDirection, TextIndent,
102    resolve_text_direction,
103};
104pub use paragraph_intrinsics::ParagraphIntrinsics;
105pub use retired::Retired;
106pub use script::Script;
107pub use shaped_glyphs::{GlyphOffset, ShapedGlyph, ShapedGlyphs};
108pub use shaper::Shaper;
109pub use shaping_span::ShapingSpan;
110pub use style::{
111    BaselineShift, LineHeightAlignment, LineHeightMode, LineHeightStyle, LineHeightTrim,
112    LocaleList, ParagraphStyle, PlatformParagraphStyle, PlatformSpanStyle, PlatformTextStyle,
113    SpanStyle, TextDrawStyle, TextGeometricTransform, TextMotion, TextShaping, TextStyle,
114};
115pub use synthesized_style::SynthesizedStyle;
116pub use text_layout::{CaretDirection, GlyphRun, PositionedGlyph, TextLayout};
117pub use text_layouter::TextLayouter;
118pub use typeface::{
119    DecorationMetrics, FontBytes, FontFamilyKey, LineMetrics, Synthesis, Typeface, TypefaceError,
120};
121pub use unit::TextUnit;
122pub use word_boundary::word_boundary;