diff --git a/core/embed/rust/src/ui/display/font.rs b/core/embed/rust/src/ui/display/font.rs index b7e22b0530..1de99b6aef 100644 --- a/core/embed/rust/src/ui/display/font.rs +++ b/core/embed/rust/src/ui/display/font.rs @@ -302,17 +302,15 @@ impl Font { } pub fn text_height(self) -> i16 { - display::get_font_info(self.into()).map_or(i16::MAX, |font| font.height.try_into().unwrap()) + unwrap!(display::get_font_info(self.into()).map(|f| f.height.try_into().unwrap())) } pub fn text_max_height(self) -> i16 { - display::get_font_info(self.into()) - .map_or(i16::MAX, |font| font.max_height.try_into().unwrap()) + unwrap!(display::get_font_info(self.into()).map(|f| f.max_height.try_into().unwrap())) } pub fn text_baseline(self) -> i16 { - display::get_font_info(self.into()) - .map_or(i16::MAX, |font| font.baseline.try_into().unwrap()) + unwrap!(display::get_font_info(self.into()).map(|f| f.baseline.try_into().unwrap())) } pub fn line_height(self) -> i16 {