mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-13 18:08:10 +00:00
fixup! fixup! refactor(core): safe iface for get_glyph_data
This commit is contained in:
parent
fb7cf535a3
commit
c1f3d3e530
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user