Skip to main content

Crate rich_typography_rs

Crate rich_typography_rs 

Source
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.
ConsoleOptions
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.
LineStyle
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§

FontError
Error type for font loading and parsing.
JustifyMethod
Text justification method.
LigatureStyleMethod
How to apply styles that fall inside a ligature glyph.
LineStyleOverride
Override type used when constructing a Font: either a row index or a full LineStyle.
LineType
Type of decorative line.
OverflowMethod
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.