mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-15 20:19:23 +00:00
bootloader: disable usage of mono/normal fonts
This commit is contained in:
parent
8b0336862f
commit
97f95f44c0
@ -76,10 +76,12 @@ OBJ_BOOTLOADER += $(addprefix $(BUILD_FW)/, \
|
||||
extmod/modtrezorui/inflate.o \
|
||||
extmod/modtrezorui/font_bitmap.o \
|
||||
extmod/modtrezorui/font_roboto_bold_20.o \
|
||||
extmod/modtrezorui/font_roboto_regular_20.o \
|
||||
extmod/modtrezorui/font_robotomono_regular_20.o \
|
||||
)
|
||||
|
||||
CFLAGS_MOD += \
|
||||
-DTREZOR_FONT_MONO_DISABLE=1 \
|
||||
-DTREZOR_FONT_NORMAL_DISABLE=1 \
|
||||
|
||||
OBJ_TREZORHAL += $(addprefix $(BUILD_FW)/, \
|
||||
trezorhal/common.o \
|
||||
trezorhal/image.o \
|
||||
|
@ -42,7 +42,7 @@ void display_vendor(const uint8_t *vimg, const char *vstr, uint32_t vstr_len, ui
|
||||
ver_str[3] += (fw_version >> 8) & 0xFF;
|
||||
ver_str[5] += (fw_version >> 16) & 0xFF;
|
||||
ver_str[7] += (fw_version >> 24) & 0xFF;
|
||||
display_text_center(120, 215, ver_str, -1, FONT_NORMAL, 0x7BEF, 0x0000);
|
||||
display_text_center(120, 215, ver_str, -1, FONT_BOLD, 0x7BEF, 0x0000);
|
||||
display_refresh();
|
||||
}
|
||||
|
||||
|
@ -7,9 +7,15 @@
|
||||
|
||||
#include "inflate.h"
|
||||
#include "font_bitmap.h"
|
||||
#ifndef TREZOR_FONT_MONO_DISABLE
|
||||
#include "font_robotomono_regular_20.h"
|
||||
#endif
|
||||
#ifndef TREZOR_FONT_NORMAL_DISABLE
|
||||
#include "font_roboto_regular_20.h"
|
||||
#endif
|
||||
#ifndef TREZOR_FONT_BOLD_DISABLE
|
||||
#include "font_roboto_bold_20.h"
|
||||
#endif
|
||||
|
||||
#include "trezor-qrenc/qr_encode.h"
|
||||
|
||||
@ -218,12 +224,18 @@ static const uint8_t *get_glyph(uint8_t font, uint8_t c)
|
||||
return 0;
|
||||
}
|
||||
switch (font) {
|
||||
#ifndef TREZOR_FONT_MONO_DISABLE
|
||||
case FONT_MONO:
|
||||
return Font_RobotoMono_Regular_20[c - ' '];
|
||||
#endif
|
||||
#ifndef TREZOR_FONT_NORMAL_DISABLE
|
||||
case FONT_NORMAL:
|
||||
return Font_Roboto_Regular_20[c - ' '];
|
||||
#endif
|
||||
#ifndef TREZOR_FONT_BOLD_DISABLE
|
||||
case FONT_BOLD:
|
||||
return Font_Roboto_Bold_20[c - ' '];
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -13,9 +13,15 @@
|
||||
#define DISPLAY_RESX 240
|
||||
#define DISPLAY_RESY 240
|
||||
|
||||
#ifndef TREZOR_FONT_MONO_DISABLE
|
||||
#define FONT_MONO 0
|
||||
#endif
|
||||
#ifndef TREZOR_FONT_NORMAL_DISABLE
|
||||
#define FONT_NORMAL 1
|
||||
#endif
|
||||
#ifndef TREZOR_FONT_BOLD_DISABLE
|
||||
#define FONT_BOLD 2
|
||||
#endif
|
||||
|
||||
#define LOADER_ICON_SIZE 64
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user