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 10, 2024
1 parent 77b3d79 commit 74ad10d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions core/embed/rust/src/ui/display/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,8 @@ impl Font {
}
text_width += c_width;
}
});

text // the whole text fits
text // the whole text fits
})
}

/// Get the length of the longest suffix from a given `text`
Expand All @@ -387,9 +386,8 @@ impl Font {
}
text_width += char_width;
}
});

text.len() // it fits in its entirety
text.len() // it fits in its entirety
})
}

pub fn visible_text_height_ex(&self, text: &str) -> (i16, i16) {
Expand Down

0 comments on commit 74ad10d

Please sign in to comment.