v2.2.0 — Text styling
Text styling attributes
Attr now carries a Style bitset alongside foreground/background colors, supporting bold, dim, italic, underline, reverse (inverse video), and strikethrough.
- Composable builders:
Attr::new(fg, bg).bold().italic(), or.with_style(Style::ITALIC | Style::UNDERLINE). - Emitted as real SGR codes on the live terminal + SSH (
Terminal::flush) and in ANSI screen dumps (ansi_dump). - The ANSI parser recognizes incoming style codes; the help viewer renders
**bold**/*italic*markdown with real terminal styles. - New
text_stylingexample:cargo run --example text_styling.
Backward compatible — Attr::new(fg, bg) keeps its two-argument signature (style defaults to empty). The classic color byte still encodes colors only (to_u8/from_u8 drop style, by design). PNG screenshots remain color-only; blink is intentionally unsupported.
See the CHANGELOG for full details.