diff --git a/SConscript.bootloader b/SConscript.bootloader index f4e56ec07..5ce10a677 100644 --- a/SConscript.bootloader +++ b/SConscript.bootloader @@ -33,8 +33,7 @@ SOURCE_MOD += [ # modtrezorui CPPDEFINES_MOD += [ - 'TREZOR_FONT_MONO_DISABLE', - 'TREZOR_FONT_NORMAL_DISABLE', + 'TREZOR_FONT_BOLD_ENABLE', ('QR_MAX_VERSION', '0'), ] SOURCE_MOD += [ diff --git a/SConscript.firmware b/SConscript.firmware index bc3587a15..3a458cef2 100644 --- a/SConscript.firmware +++ b/SConscript.firmware @@ -70,7 +70,12 @@ SOURCE_MOD += [ ] # modtrezorui -CPPDEFINES_MOD += [('QR_MAX_VERSION', '0')] +CPPDEFINES_MOD += [ + 'TREZOR_FONT_BOLD_ENABLE', + 'TREZOR_FONT_MONO_ENABLE', + 'TREZOR_FONT_NORMAL_ENABLE', + ('QR_MAX_VERSION', '0'), +] SOURCE_MOD += [ 'embed/extmod/modtrezorui/display.c', 'embed/extmod/modtrezorui/inflate.c', diff --git a/SConscript.prodtest b/SConscript.prodtest index 0b21d0c67..1ecd34d11 100644 --- a/SConscript.prodtest +++ b/SConscript.prodtest @@ -9,8 +9,7 @@ SOURCE_MOD = [] # modtrezorui CPPDEFINES_MOD += [ - 'TREZOR_FONT_MONO_DISABLE', - 'TREZOR_FONT_NORMAL_DISABLE', + 'TREZOR_FONT_BOLD_ENABLE', ('QR_MAX_VERSION', '0'), ] SOURCE_MOD += [ diff --git a/SConscript.reflash b/SConscript.reflash index 0e1f40360..74594d7a9 100644 --- a/SConscript.reflash +++ b/SConscript.reflash @@ -9,8 +9,7 @@ SOURCE_MOD = [] # modtrezorui CPPDEFINES_MOD += [ - 'TREZOR_FONT_MONO_DISABLE', - 'TREZOR_FONT_NORMAL_DISABLE', + 'TREZOR_FONT_BOLD_ENABLE', ('QR_MAX_VERSION', '0'), ] SOURCE_MOD += [ diff --git a/SConscript.unix b/SConscript.unix index 65bd40c0e..10e54e826 100644 --- a/SConscript.unix +++ b/SConscript.unix @@ -71,7 +71,12 @@ SOURCE_MOD += [ ] # modtrezorui -CPPDEFINES_MOD += [('QR_MAX_VERSION', '0')] +CPPDEFINES_MOD += [ + 'TREZOR_FONT_BOLD_ENABLE', + 'TREZOR_FONT_MONO_ENABLE', + 'TREZOR_FONT_NORMAL_ENABLE', + ('QR_MAX_VERSION', '0'), +] SOURCE_MOD += [ 'embed/extmod/modtrezorui/display.c', 'embed/extmod/modtrezorui/inflate.c', diff --git a/embed/extmod/modtrezorui/display.c b/embed/extmod/modtrezorui/display.c index e99208840..197abb0ed 100644 --- a/embed/extmod/modtrezorui/display.c +++ b/embed/extmod/modtrezorui/display.c @@ -7,13 +7,13 @@ #include "inflate.h" #include "font_bitmap.h" -#ifndef TREZOR_FONT_MONO_DISABLE +#ifdef TREZOR_FONT_MONO_ENABLE #include "font_robotomono_regular_20.h" #endif -#ifndef TREZOR_FONT_NORMAL_DISABLE +#ifdef TREZOR_FONT_NORMAL_ENABLE #include "font_roboto_regular_20.h" #endif -#ifndef TREZOR_FONT_BOLD_DISABLE +#ifdef TREZOR_FONT_BOLD_ENABLE #include "font_roboto_bold_20.h" #endif @@ -294,15 +294,15 @@ static const uint8_t *get_glyph(uint8_t font, uint8_t c) return 0; } switch (font) { -#ifndef TREZOR_FONT_MONO_DISABLE +#ifdef TREZOR_FONT_MONO_ENABLE case FONT_MONO: return Font_RobotoMono_Regular_20[c - ' ']; #endif -#ifndef TREZOR_FONT_NORMAL_DISABLE +#ifdef TREZOR_FONT_NORMAL_ENABLE case FONT_NORMAL: return Font_Roboto_Regular_20[c - ' ']; #endif -#ifndef TREZOR_FONT_BOLD_DISABLE +#ifdef TREZOR_FONT_BOLD_ENABLE case FONT_BOLD: return Font_Roboto_Bold_20[c - ' ']; #endif diff --git a/embed/extmod/modtrezorui/display.h b/embed/extmod/modtrezorui/display.h index 7951e48ed..3c08aa63c 100644 --- a/embed/extmod/modtrezorui/display.h +++ b/embed/extmod/modtrezorui/display.h @@ -19,13 +19,13 @@ #define FONT_BPP 4 -#ifndef TREZOR_FONT_MONO_DISABLE +#ifdef TREZOR_FONT_MONO_ENABLE #define FONT_MONO 0 #endif -#ifndef TREZOR_FONT_NORMAL_DISABLE +#ifdef TREZOR_FONT_NORMAL_ENABLE #define FONT_NORMAL 1 #endif -#ifndef TREZOR_FONT_BOLD_DISABLE +#ifdef TREZOR_FONT_BOLD_ENABLE #define FONT_BOLD 2 #endif