diff --git a/crates/script/src/api/mod.rs b/crates/script/src/api/mod.rs index 0df721e..47944cd 100644 --- a/crates/script/src/api/mod.rs +++ b/crates/script/src/api/mod.rs @@ -101,16 +101,22 @@ impl Panel { } #[repr(transparent)] -#[derive(Copy, Clone)] +#[derive(Copy, Clone, Debug)] pub struct Font(u32); impl Font { pub fn new(family: &str) -> Self { unsafe { Self(font_load(family.as_ptr() as u32, family.len() as u32)) } } + + /// Retrieves the script-local identifier of this font. + pub fn get_id(&self) -> u32 { + self.0 + } } #[repr(transparent)] +#[derive(Debug)] pub struct TextLayout(u32); impl TextLayout {