Skip to main content

BOLD

Constant BOLD 

Source
pub const BOLD: &'static str;
Expand description

Set bold text mode (on some terminals may be just brighter color).

Equivalent to CSI 1 m

This mode can be reset with RESET_BOLD or RESET. Note that RESET_BOLD will also reset FAINT and RESET will reset all text modes.

In some terminals, BOLD and FAINT are exclusive (e.g. konsole), in others they can be combined (e.g. vscode terminal).

§Example

use termal_core::codes;

let mut buf = codes::CLEAR.to_string();

buf += codes::BOLD;
buf += "bold text";

buf += codes::RESET_BOLD;
buf += " normal text";

println!("{buf}");

§Result in terminal