use glyphon::cosmic_text::Align;
use glyphon::{Attrs, Family, Metrics, Shaping, Stretch, Style, Weight, Wrap};
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct TextProperties {
pub metrics: Metrics,
pub align: Option<Align>,
pub attrs: Attrs<'static>,
pub wrap: Wrap,
pub shaping: Shaping,
}
impl Default for TextProperties {
fn default() -> Self {
Self {
metrics: Metrics {
font_size: 14.0,
line_height: 16.0,
},
align: None,
attrs: Attrs {
color_opt: None,
family: Family::SansSerif,
stretch: Stretch::Normal,
style: Style::Normal,
weight: Weight::NORMAL,
metadata: 0,
},
wrap: Wrap::None,
shaping: Shaping::Basic,
}
}
}