Module genpdf::style [−][src]
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 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
Style | A style annotation for a string. |
StyledCow | A |
StyledStr | |
StyledString |
Enums
Color | A color, represented by RGB, CMYK or Greyscale values. |
Effect | A text effect (bold or italic). |