improv: extract decoration metrics from the font

This commit is contained in:
Hojjat 2026-02-24 14:18:31 -07:00 committed by Jeremy Soller
parent 2758919c80
commit c12b3a9bf2
4 changed files with 62 additions and 13 deletions

View file

@ -255,6 +255,12 @@ impl TextDecoration {
}
}
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DecorationMetrics {
pub offset: f32,
pub thickness: f32,
}
/// Text attributes
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Attrs<'a> {