mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
modtrezorui: invert FONT macro inclusion logic
This commit is contained in:
parent
80707f195b
commit
79a3f84c3c
@ -33,8 +33,7 @@ SOURCE_MOD += [
|
|||||||
|
|
||||||
# modtrezorui
|
# modtrezorui
|
||||||
CPPDEFINES_MOD += [
|
CPPDEFINES_MOD += [
|
||||||
'TREZOR_FONT_MONO_DISABLE',
|
'TREZOR_FONT_BOLD_ENABLE',
|
||||||
'TREZOR_FONT_NORMAL_DISABLE',
|
|
||||||
('QR_MAX_VERSION', '0'),
|
('QR_MAX_VERSION', '0'),
|
||||||
]
|
]
|
||||||
SOURCE_MOD += [
|
SOURCE_MOD += [
|
||||||
|
@ -70,7 +70,12 @@ SOURCE_MOD += [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# modtrezorui
|
# 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 += [
|
SOURCE_MOD += [
|
||||||
'embed/extmod/modtrezorui/display.c',
|
'embed/extmod/modtrezorui/display.c',
|
||||||
'embed/extmod/modtrezorui/inflate.c',
|
'embed/extmod/modtrezorui/inflate.c',
|
||||||
|
@ -9,8 +9,7 @@ SOURCE_MOD = []
|
|||||||
|
|
||||||
# modtrezorui
|
# modtrezorui
|
||||||
CPPDEFINES_MOD += [
|
CPPDEFINES_MOD += [
|
||||||
'TREZOR_FONT_MONO_DISABLE',
|
'TREZOR_FONT_BOLD_ENABLE',
|
||||||
'TREZOR_FONT_NORMAL_DISABLE',
|
|
||||||
('QR_MAX_VERSION', '0'),
|
('QR_MAX_VERSION', '0'),
|
||||||
]
|
]
|
||||||
SOURCE_MOD += [
|
SOURCE_MOD += [
|
||||||
|
@ -9,8 +9,7 @@ SOURCE_MOD = []
|
|||||||
|
|
||||||
# modtrezorui
|
# modtrezorui
|
||||||
CPPDEFINES_MOD += [
|
CPPDEFINES_MOD += [
|
||||||
'TREZOR_FONT_MONO_DISABLE',
|
'TREZOR_FONT_BOLD_ENABLE',
|
||||||
'TREZOR_FONT_NORMAL_DISABLE',
|
|
||||||
('QR_MAX_VERSION', '0'),
|
('QR_MAX_VERSION', '0'),
|
||||||
]
|
]
|
||||||
SOURCE_MOD += [
|
SOURCE_MOD += [
|
||||||
|
@ -71,7 +71,12 @@ SOURCE_MOD += [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# modtrezorui
|
# 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 += [
|
SOURCE_MOD += [
|
||||||
'embed/extmod/modtrezorui/display.c',
|
'embed/extmod/modtrezorui/display.c',
|
||||||
'embed/extmod/modtrezorui/inflate.c',
|
'embed/extmod/modtrezorui/inflate.c',
|
||||||
|
@ -7,13 +7,13 @@
|
|||||||
|
|
||||||
#include "inflate.h"
|
#include "inflate.h"
|
||||||
#include "font_bitmap.h"
|
#include "font_bitmap.h"
|
||||||
#ifndef TREZOR_FONT_MONO_DISABLE
|
#ifdef TREZOR_FONT_MONO_ENABLE
|
||||||
#include "font_robotomono_regular_20.h"
|
#include "font_robotomono_regular_20.h"
|
||||||
#endif
|
#endif
|
||||||
#ifndef TREZOR_FONT_NORMAL_DISABLE
|
#ifdef TREZOR_FONT_NORMAL_ENABLE
|
||||||
#include "font_roboto_regular_20.h"
|
#include "font_roboto_regular_20.h"
|
||||||
#endif
|
#endif
|
||||||
#ifndef TREZOR_FONT_BOLD_DISABLE
|
#ifdef TREZOR_FONT_BOLD_ENABLE
|
||||||
#include "font_roboto_bold_20.h"
|
#include "font_roboto_bold_20.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -294,15 +294,15 @@ static const uint8_t *get_glyph(uint8_t font, uint8_t c)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
switch (font) {
|
switch (font) {
|
||||||
#ifndef TREZOR_FONT_MONO_DISABLE
|
#ifdef TREZOR_FONT_MONO_ENABLE
|
||||||
case FONT_MONO:
|
case FONT_MONO:
|
||||||
return Font_RobotoMono_Regular_20[c - ' '];
|
return Font_RobotoMono_Regular_20[c - ' '];
|
||||||
#endif
|
#endif
|
||||||
#ifndef TREZOR_FONT_NORMAL_DISABLE
|
#ifdef TREZOR_FONT_NORMAL_ENABLE
|
||||||
case FONT_NORMAL:
|
case FONT_NORMAL:
|
||||||
return Font_Roboto_Regular_20[c - ' '];
|
return Font_Roboto_Regular_20[c - ' '];
|
||||||
#endif
|
#endif
|
||||||
#ifndef TREZOR_FONT_BOLD_DISABLE
|
#ifdef TREZOR_FONT_BOLD_ENABLE
|
||||||
case FONT_BOLD:
|
case FONT_BOLD:
|
||||||
return Font_Roboto_Bold_20[c - ' '];
|
return Font_Roboto_Bold_20[c - ' '];
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,13 +19,13 @@
|
|||||||
|
|
||||||
#define FONT_BPP 4
|
#define FONT_BPP 4
|
||||||
|
|
||||||
#ifndef TREZOR_FONT_MONO_DISABLE
|
#ifdef TREZOR_FONT_MONO_ENABLE
|
||||||
#define FONT_MONO 0
|
#define FONT_MONO 0
|
||||||
#endif
|
#endif
|
||||||
#ifndef TREZOR_FONT_NORMAL_DISABLE
|
#ifdef TREZOR_FONT_NORMAL_ENABLE
|
||||||
#define FONT_NORMAL 1
|
#define FONT_NORMAL 1
|
||||||
#endif
|
#endif
|
||||||
#ifndef TREZOR_FONT_BOLD_DISABLE
|
#ifdef TREZOR_FONT_BOLD_ENABLE
|
||||||
#define FONT_BOLD 2
|
#define FONT_BOLD 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user