Expand description
Large decorative text rendering using Unicode box-drawing glyphs.
A Rust port of Python’s rich-typography by mtkalms, built on top of rich-rs.
§Quick start
use std::sync::Arc;
use rich_typography_rs::{Font, Typography};
let font = Arc::new(Font::builtin("condensedsemi").unwrap().clone());
let t = Typography::new("Hello!", Default::default(), font, 0, true, true, None);
let mut console = rich_rs::Console::new();
console.print(&t, None, None, None, false, "\n").unwrap();Structs§
- Console
- The main console for rendering output.
- Console
Options - Options passed through the rendering pipeline.
- Font
- A typography font with glyph and ligature maps.
- Glyphs
- A glyph dictionary mapping single chars or ligature sequences to glyphs.
- Line
Style - Style configuration for underline, overline, or strikethrough decorations.
- Measurement
- The minimum and maximum width requirements of a renderable.
- Segment
- A segment of text with optional style and control codes.
- Segments
- A collection of segments, backed by SmallVec for efficiency.
- Span
- A span of styled text within a Text object.
- Style
- Text style with color and attributes.
- Text
- Rich text with styled spans.
- Typography
- Large decorative text rendered using Unicode box-drawing glyphs.
Enums§
- Font
Error - Error type for font loading and parsing.
- Justify
Method - Text justification method.
- Ligature
Style Method - How to apply styles that fall inside a ligature glyph.
- Line
Style Override - Override type used when constructing a
Font: either a row index or a fullLineStyle. - Line
Type - Type of decorative line.
- Overflow
Method - Text overflow handling method.
Traits§
- Renderable
- A type that can be rendered to the console.
Type Aliases§
- Glyph
- A single glyph: a list of row strings, one per font line.