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