use core::fmt;
use parlance::{FontStyle, FontWeight, FontWidth};
#[derive(Copy, Clone, PartialEq, Default, Debug)]
pub struct Attributes {
pub width: FontWidth,
pub style: FontStyle,
pub weight: FontWeight,
}
impl Attributes {
pub fn new(width: FontWidth, style: FontStyle, weight: FontWeight) -> Self {
Self {
width,
style,
weight,
}
}
}
impl fmt::Display for Attributes {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"width: {}, style: {}, weight: {}",
self.width, self.style, self.weight
)
}
}