Module rckive_genpdf::style
source · Expand description
Types for styled strings.
A StyledString
is a String
with a Style
annotation. Accordingly, a
StyledStr
is a &str
with a Style
annotation, and a StyledCow
is either
a Cow<'_, str>
with a Style
annotation.
A Style
is a combination of a FontFamily
, a font size, a line spacing factor, a
Color
and a combination of Effect
s (bold or italic).
Example
use rckive_genpdf::style;
let style = style::Style::new().bold();
let ss1 = style::StyledStr::new("bold", style);
let ss2 = style::StyledStr::new("red", style::Color::Rgb(255, 0, 0));
Structs
A style for a line, used in styling borders and shapes.
A style annotation for a string.
A
Cow<'s, str>
with a Style
annotation.