mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-19 12:58:13 +00:00
feat(core): add fonts for T3T1
This commit is contained in:
parent
8bf84c2907
commit
d6c502f27e
@ -44,6 +44,7 @@ if TREZOR_MODEL in ('R', ):
|
|||||||
FONT_BIG='Font_PixelOperator_Regular_8'
|
FONT_BIG='Font_PixelOperator_Regular_8'
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER=None
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB=None
|
||||||
elif TREZOR_MODEL in ('T', 'DISC1', 'DISC2'):
|
elif TREZOR_MODEL in ('T', 'DISC1', 'DISC2'):
|
||||||
FONT_NORMAL='Font_TTHoves_Regular_21'
|
FONT_NORMAL='Font_TTHoves_Regular_21'
|
||||||
FONT_DEMIBOLD='Font_TTHoves_Regular_21'
|
FONT_DEMIBOLD='Font_TTHoves_Regular_21'
|
||||||
@ -52,14 +53,16 @@ elif TREZOR_MODEL in ('T', 'DISC1', 'DISC2'):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
||||||
|
FONT_SUB=None
|
||||||
elif TREZOR_MODEL in ('T3T1',):
|
elif TREZOR_MODEL in ('T3T1',):
|
||||||
FONT_NORMAL='Font_TTSatoshi_DemiBold_21'
|
FONT_NORMAL='Font_TTSatoshi_DemiBold_21'
|
||||||
FONT_DEMIBOLD='Font_TTSatoshi_DemiBold_21'
|
FONT_DEMIBOLD='Font_TTSatoshi_DemiBold_21'
|
||||||
FONT_BOLD=None
|
FONT_BOLD='Font_TTHoves_Bold_17_upper'
|
||||||
FONT_MONO='Font_TTSatoshi_DemiBold_21'
|
FONT_MONO='Font_TTSatoshi_DemiBold_21'
|
||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
||||||
|
FONT_SUB=None
|
||||||
|
|
||||||
# modtrezorcrypto
|
# modtrezorcrypto
|
||||||
CCFLAGS_MOD += '-Wno-sequence-point '
|
CCFLAGS_MOD += '-Wno-sequence-point '
|
||||||
@ -144,6 +147,7 @@ tools.add_font('MONO', FONT_MONO, CPPDEFINES_MOD, SOURCE_MOD)
|
|||||||
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
tools.add_font('SUB', FONT_SUB, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
|
||||||
env = Environment(
|
env = Environment(
|
||||||
ENV=os.environ,
|
ENV=os.environ,
|
||||||
|
@ -39,6 +39,7 @@ if TREZOR_MODEL in ('1', 'R'):
|
|||||||
FONT_BIG='Font_PixelOperator_Regular_8'
|
FONT_BIG='Font_PixelOperator_Regular_8'
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER=None
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB=None
|
||||||
elif TREZOR_MODEL in ('T',):
|
elif TREZOR_MODEL in ('T',):
|
||||||
FONT_NORMAL='Font_Roboto_Regular_20'
|
FONT_NORMAL='Font_Roboto_Regular_20'
|
||||||
FONT_DEMIBOLD=None
|
FONT_DEMIBOLD=None
|
||||||
@ -47,6 +48,7 @@ elif TREZOR_MODEL in ('T',):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER=None
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB=None
|
||||||
elif TREZOR_MODEL in ('T3T1',):
|
elif TREZOR_MODEL in ('T3T1',):
|
||||||
FONT_NORMAL='Font_TTSatoshi_DemiBold_21'
|
FONT_NORMAL='Font_TTSatoshi_DemiBold_21'
|
||||||
FONT_DEMIBOLD=None
|
FONT_DEMIBOLD=None
|
||||||
@ -55,6 +57,7 @@ elif TREZOR_MODEL in ('T3T1',):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER=None
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB=None
|
||||||
|
|
||||||
# modtrezorcrypto
|
# modtrezorcrypto
|
||||||
CCFLAGS_MOD += '-Wno-sequence-point '
|
CCFLAGS_MOD += '-Wno-sequence-point '
|
||||||
@ -119,6 +122,7 @@ tools.add_font('MONO', FONT_MONO, CPPDEFINES_MOD, SOURCE_MOD)
|
|||||||
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
tools.add_font('SUB', FONT_SUB, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
|
||||||
env = Environment(
|
env = Environment(
|
||||||
ENV=os.environ, CFLAGS='%s -DPRODUCTION=%s' % (ARGUMENTS.get('CFLAGS', ''), ARGUMENTS.get('PRODUCTION', '0')),
|
ENV=os.environ, CFLAGS='%s -DPRODUCTION=%s' % (ARGUMENTS.get('CFLAGS', ''), ARGUMENTS.get('PRODUCTION', '0')),
|
||||||
|
@ -41,6 +41,7 @@ if TREZOR_MODEL in ('1', 'R'):
|
|||||||
FONT_BIG='Font_PixelOperator_Regular_8'
|
FONT_BIG='Font_PixelOperator_Regular_8'
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER=None
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB=None
|
||||||
elif TREZOR_MODEL in ('T', 'DISC2'):
|
elif TREZOR_MODEL in ('T', 'DISC2'):
|
||||||
FONT_NORMAL='Font_TTHoves_Regular_21'
|
FONT_NORMAL='Font_TTHoves_Regular_21'
|
||||||
FONT_DEMIBOLD=None
|
FONT_DEMIBOLD=None
|
||||||
@ -49,6 +50,7 @@ elif TREZOR_MODEL in ('T', 'DISC2'):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
||||||
|
FONT_SUB=None
|
||||||
elif TREZOR_MODEL in ('T3T1',):
|
elif TREZOR_MODEL in ('T3T1',):
|
||||||
FONT_NORMAL='Font_TTSatoshi_DemiBold_21'
|
FONT_NORMAL='Font_TTSatoshi_DemiBold_21'
|
||||||
FONT_DEMIBOLD='Font_TTSatoshi_DemiBold_21'
|
FONT_DEMIBOLD='Font_TTSatoshi_DemiBold_21'
|
||||||
@ -57,6 +59,7 @@ elif TREZOR_MODEL in ('T3T1',):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
||||||
|
FONT_SUB=None
|
||||||
|
|
||||||
# modtrezorcrypto
|
# modtrezorcrypto
|
||||||
CCFLAGS_MOD += '-Wno-sequence-point '
|
CCFLAGS_MOD += '-Wno-sequence-point '
|
||||||
@ -177,6 +180,7 @@ tools.add_font('MONO', FONT_MONO, CPPDEFINES_MOD, SOURCE_MOD)
|
|||||||
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
tools.add_font('SUB', FONT_SUB, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
|
||||||
env = Environment(ENV=os.environ, CFLAGS='%s -DCONFIDENTIAL= -DPRODUCTION=%s' % (ARGUMENTS.get('CFLAGS', ''), ARGUMENTS.get('PRODUCTION', '0')))
|
env = Environment(ENV=os.environ, CFLAGS='%s -DCONFIDENTIAL= -DPRODUCTION=%s' % (ARGUMENTS.get('CFLAGS', ''), ARGUMENTS.get('PRODUCTION', '0')))
|
||||||
|
|
||||||
|
@ -50,7 +50,8 @@ if TREZOR_MODEL in ('1', 'R'):
|
|||||||
FONT_BIG='Font_Unifont_Regular_16'
|
FONT_BIG='Font_Unifont_Regular_16'
|
||||||
FONT_NORMAL_UPPER='Font_PixelOperator_Regular_8_upper'
|
FONT_NORMAL_UPPER='Font_PixelOperator_Regular_8_upper'
|
||||||
FONT_BOLD_UPPER='Font_PixelOperator_Bold_8_upper'
|
FONT_BOLD_UPPER='Font_PixelOperator_Bold_8_upper'
|
||||||
elif TREZOR_MODEL in ('T', 'T3T1', 'DISC1', 'DISC2'):
|
FONT_SUB=None
|
||||||
|
elif TREZOR_MODEL in ('T', 'DISC1', 'DISC2'):
|
||||||
FONT_NORMAL='Font_TTHoves_Regular_21'
|
FONT_NORMAL='Font_TTHoves_Regular_21'
|
||||||
FONT_DEMIBOLD='Font_TTHoves_DemiBold_21'
|
FONT_DEMIBOLD='Font_TTHoves_DemiBold_21'
|
||||||
FONT_BOLD=None
|
FONT_BOLD=None
|
||||||
@ -58,6 +59,16 @@ elif TREZOR_MODEL in ('T', 'T3T1', 'DISC1', 'DISC2'):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
||||||
|
FONT_SUB=None
|
||||||
|
elif TREZOR_MODEL in ('T3T1',):
|
||||||
|
FONT_NORMAL='Font_TTSatoshi_DemiBold_21'
|
||||||
|
FONT_DEMIBOLD='Font_TTSatoshi_DemiBold_21'
|
||||||
|
FONT_BOLD='Font_TTSatoshi_DemiBold_21'
|
||||||
|
FONT_MONO='Font_RobotoMono_Medium_21'
|
||||||
|
FONT_BIG='Font_TTSatoshi_DemiBold_42'
|
||||||
|
FONT_NORMAL_UPPER=None
|
||||||
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB='Font_TTSatoshi_DemiBold_18'
|
||||||
|
|
||||||
# modtrezorconfig
|
# modtrezorconfig
|
||||||
CPPPATH_MOD += [
|
CPPPATH_MOD += [
|
||||||
@ -424,6 +435,7 @@ tools.add_font('MONO', FONT_MONO, CPPDEFINES_MOD, SOURCE_MOD)
|
|||||||
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
tools.add_font('SUB', FONT_SUB, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
|
||||||
SOURCE_QSTR = SOURCE_MOD + SOURCE_MICROPYTHON + SOURCE_MICROPYTHON_SPEED
|
SOURCE_QSTR = SOURCE_MOD + SOURCE_MICROPYTHON + SOURCE_MICROPYTHON_SPEED
|
||||||
|
|
||||||
|
@ -42,7 +42,8 @@ if TREZOR_MODEL in ('1', 'R'):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER=None
|
FONT_BOLD_UPPER=None
|
||||||
elif TREZOR_MODEL in ('T', 'T3T1'):
|
FONT_SUB=None
|
||||||
|
elif TREZOR_MODEL in ('T',):
|
||||||
FONT_NORMAL=None
|
FONT_NORMAL=None
|
||||||
FONT_DEMIBOLD=None
|
FONT_DEMIBOLD=None
|
||||||
FONT_BOLD='Font_Roboto_Bold_20'
|
FONT_BOLD='Font_Roboto_Bold_20'
|
||||||
@ -50,6 +51,16 @@ elif TREZOR_MODEL in ('T', 'T3T1'):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER=None
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB=None
|
||||||
|
elif TREZOR_MODEL in ('T3T1',):
|
||||||
|
FONT_NORMAL='Font_TTSatoshi_DemiBold_21'
|
||||||
|
FONT_DEMIBOLD=None
|
||||||
|
FONT_BOLD='Font_TTSatoshi_DemiBold_21'
|
||||||
|
FONT_MONO='Font_RobotoMono_Medium_21'
|
||||||
|
FONT_BIG=None
|
||||||
|
FONT_NORMAL_UPPER=None
|
||||||
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB=None
|
||||||
|
|
||||||
# modtrezorcrypto
|
# modtrezorcrypto
|
||||||
CPPPATH_MOD += [
|
CPPPATH_MOD += [
|
||||||
@ -110,6 +121,7 @@ tools.add_font('MONO', FONT_MONO, CPPDEFINES_MOD, SOURCE_MOD)
|
|||||||
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
tools.add_font('SUB', FONT_SUB, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
|
||||||
env = Environment(
|
env = Environment(
|
||||||
ENV=os.environ,
|
ENV=os.environ,
|
||||||
|
@ -37,7 +37,8 @@ if TREZOR_MODEL in ('1', 'R'):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER=None
|
FONT_BOLD_UPPER=None
|
||||||
elif TREZOR_MODEL in ('T', 'T3T1'):
|
FONT_SUB=None
|
||||||
|
elif TREZOR_MODEL in ('T',):
|
||||||
FONT_NORMAL=None
|
FONT_NORMAL=None
|
||||||
FONT_DEMIBOLD=None
|
FONT_DEMIBOLD=None
|
||||||
FONT_BOLD='Font_Roboto_Bold_20'
|
FONT_BOLD='Font_Roboto_Bold_20'
|
||||||
@ -45,6 +46,16 @@ elif TREZOR_MODEL in ('T', 'T3T1'):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER=None
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB=None
|
||||||
|
elif TREZOR_MODEL in ('T3T1',):
|
||||||
|
FONT_NORMAL=None
|
||||||
|
FONT_DEMIBOLD=None
|
||||||
|
FONT_BOLD='Font_TTSatoshi_DemiBold_21'
|
||||||
|
FONT_MONO=None
|
||||||
|
FONT_BIG=None
|
||||||
|
FONT_NORMAL_UPPER=None
|
||||||
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB=None
|
||||||
|
|
||||||
# modtrezorcrypto
|
# modtrezorcrypto
|
||||||
CPPPATH_MOD += [
|
CPPPATH_MOD += [
|
||||||
@ -82,6 +93,7 @@ tools.add_font('MONO', FONT_MONO, CPPDEFINES_MOD, SOURCE_MOD)
|
|||||||
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
tools.add_font('SUB', FONT_SUB, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
|
||||||
env = Environment(
|
env = Environment(
|
||||||
ENV=os.environ,
|
ENV=os.environ,
|
||||||
|
@ -55,7 +55,8 @@ if TREZOR_MODEL in ('1', 'R'):
|
|||||||
FONT_BIG='Font_Unifont_Regular_16'
|
FONT_BIG='Font_Unifont_Regular_16'
|
||||||
FONT_NORMAL_UPPER='Font_PixelOperator_Regular_8_upper'
|
FONT_NORMAL_UPPER='Font_PixelOperator_Regular_8_upper'
|
||||||
FONT_BOLD_UPPER='Font_PixelOperator_Bold_8_upper'
|
FONT_BOLD_UPPER='Font_PixelOperator_Bold_8_upper'
|
||||||
elif TREZOR_MODEL in ('T', 'T3T1'):
|
FONT_SUB=None
|
||||||
|
elif TREZOR_MODEL in ('T',):
|
||||||
FONT_NORMAL='Font_TTHoves_Regular_21'
|
FONT_NORMAL='Font_TTHoves_Regular_21'
|
||||||
FONT_DEMIBOLD='Font_TTHoves_DemiBold_21'
|
FONT_DEMIBOLD='Font_TTHoves_DemiBold_21'
|
||||||
FONT_BOLD=None
|
FONT_BOLD=None
|
||||||
@ -63,6 +64,16 @@ elif TREZOR_MODEL in ('T', 'T3T1'):
|
|||||||
FONT_BIG=None
|
FONT_BIG=None
|
||||||
FONT_NORMAL_UPPER=None
|
FONT_NORMAL_UPPER=None
|
||||||
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
FONT_BOLD_UPPER='Font_TTHoves_Bold_17_upper'
|
||||||
|
FONT_SUB=None
|
||||||
|
elif TREZOR_MODEL in ('T3T1',):
|
||||||
|
FONT_NORMAL='Font_TTSatoshi_DemiBold_21'
|
||||||
|
FONT_DEMIBOLD='Font_TTSatoshi_DemiBold_21'
|
||||||
|
FONT_BOLD='Font_TTSatoshi_DemiBold_21'
|
||||||
|
FONT_MONO='Font_RobotoMono_Medium_21'
|
||||||
|
FONT_BIG='Font_TTSatoshi_DemiBold_42'
|
||||||
|
FONT_NORMAL_UPPER=None
|
||||||
|
FONT_BOLD_UPPER=None
|
||||||
|
FONT_SUB='Font_TTSatoshi_DemiBold_18'
|
||||||
|
|
||||||
# modtrezorconfig
|
# modtrezorconfig
|
||||||
CPPPATH_MOD += [
|
CPPPATH_MOD += [
|
||||||
@ -446,6 +457,7 @@ tools.add_font('MONO', FONT_MONO, CPPDEFINES_MOD, SOURCE_MOD)
|
|||||||
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BIG', FONT_BIG, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('NORMAL_UPPER', FONT_NORMAL_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
tools.add_font('BOLD_UPPER', FONT_BOLD_UPPER, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
tools.add_font('SUB', FONT_SUB, CPPDEFINES_MOD, SOURCE_MOD)
|
||||||
|
|
||||||
|
|
||||||
SOURCE_QSTR = SOURCE_MOD + SOURCE_MICROPYTHON + SOURCE_UNIX
|
SOURCE_QSTR = SOURCE_MOD + SOURCE_MICROPYTHON + SOURCE_UNIX
|
||||||
|
@ -57,6 +57,10 @@ int font_height(int font) {
|
|||||||
#ifdef TREZOR_FONT_BIG_ENABLE
|
#ifdef TREZOR_FONT_BIG_ENABLE
|
||||||
case FONT_BIG:
|
case FONT_BIG:
|
||||||
return FONT_BIG_HEIGHT;
|
return FONT_BIG_HEIGHT;
|
||||||
|
#endif
|
||||||
|
#ifdef TREZOR_FONT_SUB_ENABLE
|
||||||
|
case FONT_SUB:
|
||||||
|
return FONT_SUB_HEIGHT;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -91,6 +95,10 @@ int font_max_height(int font) {
|
|||||||
#ifdef TREZOR_FONT_BIG_ENABLE
|
#ifdef TREZOR_FONT_BIG_ENABLE
|
||||||
case FONT_BIG:
|
case FONT_BIG:
|
||||||
return FONT_BIG_MAX_HEIGHT;
|
return FONT_BIG_MAX_HEIGHT;
|
||||||
|
#endif
|
||||||
|
#ifdef TREZOR_FONT_SUB_ENABLE
|
||||||
|
case FONT_SUB:
|
||||||
|
return FONT_SUB_MAX_HEIGHT;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -125,6 +133,10 @@ int font_baseline(int font) {
|
|||||||
#ifdef TREZOR_FONT_BIG_ENABLE
|
#ifdef TREZOR_FONT_BIG_ENABLE
|
||||||
case FONT_BIG:
|
case FONT_BIG:
|
||||||
return FONT_BIG_BASELINE;
|
return FONT_BIG_BASELINE;
|
||||||
|
#endif
|
||||||
|
#ifdef TREZOR_FONT_SUB_ENABLE
|
||||||
|
case FONT_SUB:
|
||||||
|
return FONT_SUB_BASELINE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -231,6 +243,10 @@ const uint8_t *font_nonprintable_glyph(int font) {
|
|||||||
#ifdef TREZOR_FONT_BIG_ENABLE
|
#ifdef TREZOR_FONT_BIG_ENABLE
|
||||||
case FONT_BIG:
|
case FONT_BIG:
|
||||||
return NONPRINTABLE_GLYPH(FONT_BIG_DATA);
|
return NONPRINTABLE_GLYPH(FONT_BIG_DATA);
|
||||||
|
#endif
|
||||||
|
#ifdef TREZOR_FONT_SUB_ENABLE
|
||||||
|
case FONT_SUB:
|
||||||
|
return NONPRINTABLE_GLYPH(FONT_SUB_DATA);
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -280,6 +296,10 @@ const uint8_t *font_get_glyph(int font, uint16_t c) {
|
|||||||
#ifdef TREZOR_FONT_BIG_ENABLE
|
#ifdef TREZOR_FONT_BIG_ENABLE
|
||||||
case FONT_BIG:
|
case FONT_BIG:
|
||||||
return FONT_BIG_DATA[c - ' '];
|
return FONT_BIG_DATA[c - ' '];
|
||||||
|
#endif
|
||||||
|
#ifdef TREZOR_FONT_SUB_ENABLE
|
||||||
|
case FONT_SUB:
|
||||||
|
return FONT_SUB_DATA[c - ' '];
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -64,6 +64,15 @@
|
|||||||
FONT_DEFINE(TREZOR_FONT_DEMIBOLD_ENABLE, _BASELINE)
|
FONT_DEFINE(TREZOR_FONT_DEMIBOLD_ENABLE, _BASELINE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef TREZOR_FONT_SUB_ENABLE
|
||||||
|
#include TREZOR_FONT_SUB_INCLUDE
|
||||||
|
#define FONT_SUB (-8)
|
||||||
|
#define FONT_SUB_DATA TREZOR_FONT_SUB_ENABLE
|
||||||
|
#define FONT_SUB_HEIGHT FONT_DEFINE(TREZOR_FONT_SUB_ENABLE, _HEIGHT)
|
||||||
|
#define FONT_SUB_MAX_HEIGHT FONT_DEFINE(TREZOR_FONT_SUB_ENABLE, _MAX_HEIGHT)
|
||||||
|
#define FONT_SUB_BASELINE FONT_DEFINE(TREZOR_FONT_SUB_ENABLE, _BASELINE)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TREZOR_FONT_MONO_ENABLE
|
#ifdef TREZOR_FONT_MONO_ENABLE
|
||||||
#include TREZOR_FONT_MONO_INCLUDE
|
#include TREZOR_FONT_MONO_INCLUDE
|
||||||
#define FONT_MONO (-3)
|
#define FONT_MONO (-3)
|
||||||
@ -148,10 +157,16 @@
|
|||||||
#define FONT_MAX_HEIGHT_7 FONT_MAX_HEIGHT_6
|
#define FONT_MAX_HEIGHT_7 FONT_MAX_HEIGHT_6
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TREZOR_FONT_MONO_ENABLE
|
#ifdef TREZOR_FONT_SUB_ENABLE
|
||||||
#define FONT_MAX_HEIGHT MAX_FONT_H(FONT_MONO_MAX_HEIGHT, FONT_MAX_HEIGHT_7)
|
#define FONT_MAX_HEIGHT_8 MAX_FONT_H(FONT_SUB_MAX_HEIGHT, FONT_MAX_HEIGHT_7)
|
||||||
#else
|
#else
|
||||||
#define FONT_MAX_HEIGHT FONT_MAX_HEIGHT_7
|
#define FONT_MAX_HEIGHT_8 FONT_MAX_HEIGHT_7
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef TREZOR_FONT_MONO_ENABLE
|
||||||
|
#define FONT_MAX_HEIGHT MAX_FONT_H(FONT_MONO_MAX_HEIGHT, FONT_MAX_HEIGHT_8)
|
||||||
|
#else
|
||||||
|
#define FONT_MAX_HEIGHT FONT_MAX_HEIGHT_8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int font_height(int font);
|
int font_height(int font);
|
||||||
|
@ -155,6 +155,7 @@ pub enum Font {
|
|||||||
DEMIBOLD = 5,
|
DEMIBOLD = 5,
|
||||||
NORMAL_UPPER = 6,
|
NORMAL_UPPER = 6,
|
||||||
BOLD_UPPER = 7,
|
BOLD_UPPER = 7,
|
||||||
|
SUB = 8,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<Font> for i32 {
|
impl From<Font> for i32 {
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
"4_FONT_BIG": "font_unifont_regular_16_cs.json",
|
"4_FONT_BIG": "font_unifont_regular_16_cs.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_cs.json",
|
"5_FONT_DEMIBOLD": "font_unifont_bold_16_cs.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_cs.json",
|
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_cs.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_cs.json"
|
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_cs.json",
|
||||||
|
"8_FONT_SUB": null
|
||||||
},
|
},
|
||||||
"T2T1": {
|
"T2T1": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_cs.json",
|
"1_FONT_NORMAL": "font_tthoves_regular_21_cs.json",
|
||||||
@ -16,16 +17,18 @@
|
|||||||
"4_FONT_BIG": null,
|
"4_FONT_BIG": null,
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_cs.json",
|
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_cs.json",
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
"6_FONT_NORMAL_UPPER": null,
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_cs.json"
|
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_cs.json",
|
||||||
|
"8_FONT_SUB": null
|
||||||
},
|
},
|
||||||
"T3T1": {
|
"T3T1": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_cs.json",
|
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_cs.json",
|
||||||
"2_FONT_BOLD": null,
|
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_cs.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_cs.json",
|
"3_FONT_MONO": "font_robotomono_medium_21_cs.json",
|
||||||
"4_FONT_BIG": null,
|
"4_FONT_BIG": "font_ttsatoshi_demibold_42_cs.json",
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_cs.json",
|
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_cs.json",
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
"6_FONT_NORMAL_UPPER": null,
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_cs.json"
|
"7_FONT_BOLD_UPPER":null,
|
||||||
|
"8_FONT_SUB": "font_ttsatoshi_demibold_18_cs.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
"4_FONT_BIG": "font_unifont_regular_16_de.json",
|
"4_FONT_BIG": "font_unifont_regular_16_de.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_de.json",
|
"5_FONT_DEMIBOLD": "font_unifont_bold_16_de.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_de.json",
|
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_de.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_de.json"
|
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_de.json",
|
||||||
|
"8_FONT_SUB": null
|
||||||
},
|
},
|
||||||
"T2T1": {
|
"T2T1": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_de.json",
|
"1_FONT_NORMAL": "font_tthoves_regular_21_de.json",
|
||||||
@ -16,16 +17,18 @@
|
|||||||
"4_FONT_BIG": null,
|
"4_FONT_BIG": null,
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_de.json",
|
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_de.json",
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
"6_FONT_NORMAL_UPPER": null,
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_de.json"
|
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_de.json",
|
||||||
|
"8_FONT_SUB": null
|
||||||
},
|
},
|
||||||
"T3T1": {
|
"T3T1": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_de.json",
|
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_de.json",
|
||||||
"2_FONT_BOLD": null,
|
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_de.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_de.json",
|
"3_FONT_MONO": "font_robotomono_medium_21_de.json",
|
||||||
"4_FONT_BIG": null,
|
"4_FONT_BIG": "font_ttsatoshi_demibold_42_de.json",
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_de.json",
|
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_de.json",
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
"6_FONT_NORMAL_UPPER": null,
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_de.json"
|
"7_FONT_BOLD_UPPER": null,
|
||||||
|
"8_FONT_SUB": "font_ttsatoshi_demibold_18_de.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
"4_FONT_BIG": "font_unifont_regular_16_es.json",
|
"4_FONT_BIG": "font_unifont_regular_16_es.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_es.json",
|
"5_FONT_DEMIBOLD": "font_unifont_bold_16_es.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_es.json",
|
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_es.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_es.json"
|
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_es.json",
|
||||||
|
"8_FONT_SUB": null
|
||||||
},
|
},
|
||||||
"T2T1": {
|
"T2T1": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_es.json",
|
"1_FONT_NORMAL": "font_tthoves_regular_21_es.json",
|
||||||
@ -16,16 +17,18 @@
|
|||||||
"4_FONT_BIG": null,
|
"4_FONT_BIG": null,
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_es.json",
|
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_es.json",
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
"6_FONT_NORMAL_UPPER": null,
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_es.json"
|
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_es.json",
|
||||||
|
"8_FONT_SUB": null
|
||||||
},
|
},
|
||||||
"T3T1": {
|
"T3T1": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_es.json",
|
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_es.json",
|
||||||
"2_FONT_BOLD": null,
|
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_es.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_es.json",
|
"3_FONT_MONO": "font_robotomono_medium_21_es.json",
|
||||||
"4_FONT_BIG": null,
|
"4_FONT_BIG": "font_ttsatoshi_demibold_42_es.json",
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_es.json",
|
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_es.json",
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
"6_FONT_NORMAL_UPPER": null,
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_es.json"
|
"7_FONT_BOLD_UPPER": null,
|
||||||
|
"8_FONT_SUB": "font_ttsatoshi_demibold_18_es.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
"4_FONT_BIG": "font_unifont_regular_16_fr.json",
|
"4_FONT_BIG": "font_unifont_regular_16_fr.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_fr.json",
|
"5_FONT_DEMIBOLD": "font_unifont_bold_16_fr.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_fr.json",
|
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_fr.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_fr.json"
|
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_fr.json",
|
||||||
|
"8_FONT_SUB": null
|
||||||
},
|
},
|
||||||
"T2T1": {
|
"T2T1": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_fr.json",
|
"1_FONT_NORMAL": "font_tthoves_regular_21_fr.json",
|
||||||
@ -16,16 +17,18 @@
|
|||||||
"4_FONT_BIG": null,
|
"4_FONT_BIG": null,
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_fr.json",
|
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_fr.json",
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
"6_FONT_NORMAL_UPPER": null,
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_fr.json"
|
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_fr.json",
|
||||||
|
"8_FONT_SUB": null
|
||||||
},
|
},
|
||||||
"T3T1": {
|
"T3T1": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_fr.json",
|
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_fr.json",
|
||||||
"2_FONT_BOLD": null,
|
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_fr.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_fr.json",
|
"3_FONT_MONO": "font_robotomono_medium_21_fr.json",
|
||||||
"4_FONT_BIG": null,
|
"4_FONT_BIG": "font_ttsatoshi_demibold_42_fr.json",
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_fr.json",
|
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_fr.json",
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
"6_FONT_NORMAL_UPPER": null,
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_fr.json"
|
"7_FONT_BOLD_UPPER": null,
|
||||||
|
"8_FONT_SUB": "font_ttsatoshi_demibold_18_fr.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
Loading…
Reference in New Issue
Block a user