Skip to main content

rocketsplash_formats/
style_flags.rs

1// <FILE>crates/rocketsplash-formats/src/style_flags.rs</FILE>
2// <DESC>Style flags describing available font variants</DESC>
3// <VERS>VERSION: 1.0.0</VERS>
4// <WCTX>Runtime library implementation</WCTX>
5// <CLOG>Introduce StyleFlags bitflags for font metadata</CLOG>
6
7use bitflags::bitflags;
8use serde::{Deserialize, Serialize};
9
10bitflags! {
11    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
12    pub struct StyleFlags: u8 {
13        const BOLD = 0b0001;
14        const ITALIC = 0b0010;
15        const BOLD_ITALIC = 0b0100;
16        const REVERSE = 0b1000;
17    }
18}
19
20// <FILE>crates/rocketsplash-formats/src/style_flags.rs</FILE>
21// <VERS>END OF VERSION: 1.0.0</VERS>