1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-02 02:41:28 +00:00

feat(core/rust/ui): expose text_max_height and baseline

[no changelog]
This commit is contained in:
matejcik 2022-11-23 15:19:52 +01:00 committed by matejcik
parent 615c8a0e64
commit 3f6ea00e02

View File

@ -1022,15 +1022,23 @@ impl From<Font> for i32 {
impl Font {
pub fn text_width(self, text: &str) -> i16 {
display::text_width(text, self.into()) as i16
display::text_width(text, self.into())
}
pub fn char_width(self, ch: char) -> i16 {
display::char_width(ch, self.into()) as i16
display::char_width(ch, self.into())
}
pub fn text_height(self) -> i16 {
display::text_height(self.into()) as i16
display::text_height(self.into())
}
pub fn text_max_height(self) -> i16 {
display::text_max_height(self.into())
}
pub fn text_baseline(self) -> i16 {
display::text_baseline(self.into())
}
pub fn line_height(self) -> i16 {