Skip to content

Commit

Permalink
fixup! fixup! refactor(core): safe iface for get_glyph_data
Browse files Browse the repository at this point in the history
  • Loading branch information
obrusvit committed Dec 13, 2024
1 parent fb7cf53 commit c1f3d3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/embed/rust/src/ui/display/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,15 @@ impl Font {
}

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 {
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 {
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 {
Expand Down

0 comments on commit c1f3d3e

Please sign in to comment.