1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-14 02:18:07 +00:00

fixup! fixup! refactor(core): safe iface for get_glyph_data

This commit is contained in:
obrusvit 2024-12-13 17:44:08 +01:00
parent fb7cf535a3
commit c1f3d3e530

View File

@ -313,15 +313,15 @@ impl Font {
} }
pub fn text_height(self) -> i16 { pub fn text_height(self) -> i16 {
unwrap!(display::get_font_info(self.into()).map(|f| f.height.try_into().unwrap())) unwrap!(display::get_font_info(self.into()).map(|f| f.height as i16))
} }
pub fn text_max_height(self) -> i16 { pub fn text_max_height(self) -> i16 {
unwrap!(display::get_font_info(self.into()).map(|f| f.max_height.try_into().unwrap())) unwrap!(display::get_font_info(self.into()).map(|f| f.max_height as i16))
} }
pub fn text_baseline(self) -> i16 { pub fn text_baseline(self) -> i16 {
unwrap!(display::get_font_info(self.into()).map(|f| f.baseline.try_into().unwrap())) unwrap!(display::get_font_info(self.into()).map(|f| f.baseline as i16))
} }
pub fn line_height(self) -> i16 { pub fn line_height(self) -> i16 {