From d926c90d6fc4f1183dee5416c9eb984600de4fed Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Wed, 30 Aug 2023 22:04:00 -0700 Subject: [PATCH] Add Graphics::get_font_height --- src/graphics.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/graphics.rs b/src/graphics.rs index 7444881..0bd2733 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -761,6 +761,10 @@ impl Graphics { ) } + pub fn get_font_height(&self, font: &Font) -> Result { + pd_func_caller!((*self.0).getFontHeight, font.0) + } + pub fn get_system_text_width(&self, text: &str, tracking: i32) -> Result { let c_text = CString::new(text).map_err(Error::msg)?; pd_func_caller!(