1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-12 17:38:13 +00:00

fixup! refactor(core): remove UTF-8 support from C

This commit is contained in:
obrusvit 2024-12-09 11:57:45 +01:00
parent 45d747fa91
commit dd36660f47

View File

@ -12,6 +12,11 @@ pub fn backlight(val: i32) -> i32 {
}
pub fn get_font_info(font: i32) -> Option<FontInfo> {
// SAFETY:
// - `ffi::get_font_info` returns either null (for invalid fonts) or a pointer to a static font_info_t struct
// - The font_info_t data is in ROM, making it immutable and static
// - The font_info_t contains pointers to static glyph data arrays also in ROM
// - All font data is generated at compile time and included in the binary
unsafe {
let font = ffi::get_font_info(font);
Some(*font.as_ref()?)