Skip to content

Commit

Permalink
refactor(core): change gen_font.py and regen fonts
Browse files Browse the repository at this point in the history
Change to the new structures and preserve manual changes. This commit
also removes duplicated definition of nonprintable glyph for _UPPER
fonts.

[no changelog]
  • Loading branch information
obrusvit committed Sep 19, 2024
1 parent 25cabd5 commit 6e50231
Show file tree
Hide file tree
Showing 32 changed files with 271 additions and 150 deletions.
25 changes: 20 additions & 5 deletions core/embed/lib/fonts/font_pixeloperator_bold_8.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

// clang-format off

Expand Down Expand Up @@ -106,11 +107,9 @@
/* } */ static const uint8_t Font_PixelOperator_Bold_8_glyph_125[] = { 5, 7, 6, 0, 7, 225, 140, 51, 27, 128 };
/* ~ */ static const uint8_t Font_PixelOperator_Bold_8_glyph_126[] = { 7, 2, 8, 0, 7, 119, 184 };

/* ? */ const uint8_t Font_PixelOperator_Bold_8_glyph_nonprintable[] = { 6, 7, 7, 0, 7, 132, 207, 57, 207, 252, 255 };
/* ? */ static const uint8_t Font_PixelOperator_Bold_8_glyph_nonprintable[] = { 6, 7, 7, 0, 7, 132, 207, 57, 207, 252, 255 };

/* ? */ const uint8_t Font_PixelOperator_Bold_8_upper_glyph_nonprintable[] = { 6, 7, 7, 0, 7, 132, 207, 57, 207, 252, 255 };

const uint8_t * const Font_PixelOperator_Bold_8[126 + 1 - 32] = {
static const uint8_t * const Font_PixelOperator_Bold_8[126 + 1 - 32] = {
Font_PixelOperator_Bold_8_glyph_32,
Font_PixelOperator_Bold_8_glyph_33,
Font_PixelOperator_Bold_8_glyph_34,
Expand Down Expand Up @@ -208,7 +207,7 @@ const uint8_t * const Font_PixelOperator_Bold_8[126 + 1 - 32] = {
Font_PixelOperator_Bold_8_glyph_126,
};

const uint8_t * const Font_PixelOperator_Bold_8_upper[126 + 1 - 32] = {
static const uint8_t * const Font_PixelOperator_Bold_8_upper[126 + 1 - 32] = {
Font_PixelOperator_Bold_8_glyph_32,
Font_PixelOperator_Bold_8_glyph_33,
Font_PixelOperator_Bold_8_glyph_34,
Expand Down Expand Up @@ -305,3 +304,19 @@ const uint8_t * const Font_PixelOperator_Bold_8_upper[126 + 1 - 32] = {
Font_PixelOperator_Bold_8_glyph_125,
Font_PixelOperator_Bold_8_glyph_126,
};

const font_info_t Font_PixelOperator_Bold_8_info = {
.height = 8,
.max_height = 8,
.baseline = 1,
.glyph_data = Font_PixelOperator_Bold_8,
.glyph_nonprintable = Font_PixelOperator_Bold_8_glyph_nonprintable,
};

const font_info_t Font_PixelOperator_Bold_8_upper_info = {
.height = 8,
.max_height = 8,
.baseline = 1,
.glyph_data = Font_PixelOperator_Bold_8_upper,
.glyph_nonprintable = Font_PixelOperator_Bold_8_glyph_nonprintable,
};
12 changes: 4 additions & 8 deletions core/embed/lib/fonts/font_pixeloperator_bold_8.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

#if TREZOR_FONT_BPP != 1
#error Wrong TREZOR_FONT_BPP (expected 1)
#endif
#define Font_PixelOperator_Bold_8_HEIGHT 8

#define Font_PixelOperator_Bold_8_MAX_HEIGHT 8
#define Font_PixelOperator_Bold_8_BASELINE 1
extern const uint8_t* const Font_PixelOperator_Bold_8[126 + 1 - 32];
extern const uint8_t Font_PixelOperator_Bold_8_glyph_nonprintable[];
#define Font_PixelOperator_Bold_8_upper_HEIGHT 8
extern const font_info_t Font_PixelOperator_Bold_8_info;
#define Font_PixelOperator_Bold_8_upper_MAX_HEIGHT 8
#define Font_PixelOperator_Bold_8_upper_BASELINE 1
extern const uint8_t* const Font_PixelOperator_Bold_8_upper[126 + 1 - 32];
extern const uint8_t Font_PixelOperator_Bold_8_upper_glyph_nonprintable[];
extern const font_info_t Font_PixelOperator_Bold_8_upper_info;
25 changes: 20 additions & 5 deletions core/embed/lib/fonts/font_pixeloperator_regular_8.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

// clang-format off

Expand Down Expand Up @@ -106,11 +107,9 @@
/* } */ static const uint8_t Font_PixelOperator_Regular_8_glyph_125[] = { 4, 7, 6, 0, 7, 194, 33, 34, 192 };
/* ~ */ static const uint8_t Font_PixelOperator_Regular_8_glyph_126[] = { 6, 2, 7, 0, 7, 102, 96 };

/* ? */ const uint8_t Font_PixelOperator_Regular_8_glyph_nonprintable[] = { 5, 7, 6, 0, 7, 139, 189, 221, 255, 127 };
/* ? */ static const uint8_t Font_PixelOperator_Regular_8_glyph_nonprintable[] = { 5, 7, 6, 0, 7, 139, 189, 221, 255, 127 };

/* ? */ const uint8_t Font_PixelOperator_Regular_8_upper_glyph_nonprintable[] = { 5, 7, 6, 0, 7, 139, 189, 221, 255, 127 };

const uint8_t * const Font_PixelOperator_Regular_8[126 + 1 - 32] = {
static const uint8_t * const Font_PixelOperator_Regular_8[126 + 1 - 32] = {
Font_PixelOperator_Regular_8_glyph_32,
Font_PixelOperator_Regular_8_glyph_33,
Font_PixelOperator_Regular_8_glyph_34,
Expand Down Expand Up @@ -208,7 +207,7 @@ const uint8_t * const Font_PixelOperator_Regular_8[126 + 1 - 32] = {
Font_PixelOperator_Regular_8_glyph_126,
};

const uint8_t * const Font_PixelOperator_Regular_8_upper[126 + 1 - 32] = {
static const uint8_t * const Font_PixelOperator_Regular_8_upper[126 + 1 - 32] = {
Font_PixelOperator_Regular_8_glyph_32,
Font_PixelOperator_Regular_8_glyph_33,
Font_PixelOperator_Regular_8_glyph_34,
Expand Down Expand Up @@ -305,3 +304,19 @@ const uint8_t * const Font_PixelOperator_Regular_8_upper[126 + 1 - 32] = {
Font_PixelOperator_Regular_8_glyph_125,
Font_PixelOperator_Regular_8_glyph_126,
};

const font_info_t Font_PixelOperator_Regular_8_info = {
.height = 8,
.max_height = 8,
.baseline = 1,
.glyph_data = Font_PixelOperator_Regular_8,
.glyph_nonprintable = Font_PixelOperator_Regular_8_glyph_nonprintable,
};

const font_info_t Font_PixelOperator_Regular_8_upper_info = {
.height = 8,
.max_height = 8,
.baseline = 1,
.glyph_data = Font_PixelOperator_Regular_8_upper,
.glyph_nonprintable = Font_PixelOperator_Regular_8_glyph_nonprintable,
};
12 changes: 4 additions & 8 deletions core/embed/lib/fonts/font_pixeloperator_regular_8.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

#if TREZOR_FONT_BPP != 1
#error Wrong TREZOR_FONT_BPP (expected 1)
#endif
#define Font_PixelOperator_Regular_8_HEIGHT 8

#define Font_PixelOperator_Regular_8_MAX_HEIGHT 8
#define Font_PixelOperator_Regular_8_BASELINE 1
extern const uint8_t* const Font_PixelOperator_Regular_8[126 + 1 - 32];
extern const uint8_t Font_PixelOperator_Regular_8_glyph_nonprintable[];
#define Font_PixelOperator_Regular_8_upper_HEIGHT 8
extern const font_info_t Font_PixelOperator_Regular_8_info;
#define Font_PixelOperator_Regular_8_upper_MAX_HEIGHT 8
#define Font_PixelOperator_Regular_8_upper_BASELINE 1
extern const uint8_t* const Font_PixelOperator_Regular_8_upper[126 + 1 - 32];
extern const uint8_t Font_PixelOperator_Regular_8_upper_glyph_nonprintable[];
extern const font_info_t Font_PixelOperator_Regular_8_upper_info;
14 changes: 11 additions & 3 deletions core/embed/lib/fonts/font_pixeloperatormono_regular_8.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

// clang-format off

Expand All @@ -10,7 +11,6 @@

// NOTE: hand-changed all the advances with 8 to 7
// NOTE: hand-changed the visuals of "m", "w", "M" and "W" to make it narrower

/* */ static const uint8_t Font_PixelOperatorMono_Regular_8_glyph_32[] = { 0, 0, 7, 0, 0 }; // width hand-changed from 8 to 7 to have 9px space between words
/* ! */ static const uint8_t Font_PixelOperatorMono_Regular_8_glyph_33[] = { 1, 7, 7, 2, 7, 250 };
/* " */ static const uint8_t Font_PixelOperatorMono_Regular_8_glyph_34[] = { 3, 3, 7, 1, 7, 182, 128 };
Expand Down Expand Up @@ -107,9 +107,9 @@
/* } */ static const uint8_t Font_PixelOperatorMono_Regular_8_glyph_125[] = { 4, 7, 7, 0, 7, 194, 33, 34, 192 };
/* ~ */ static const uint8_t Font_PixelOperatorMono_Regular_8_glyph_126[] = { 6, 2, 7, 0, 7, 102, 96 };

/* ? */ const uint8_t Font_PixelOperatorMono_Regular_8_glyph_nonprintable[] = { 5, 7, 7, 0, 7, 139, 189, 221, 255, 127 };
/* ? */ static const uint8_t Font_PixelOperatorMono_Regular_8_glyph_nonprintable[] = { 5, 7, 7, 0, 7, 139, 189, 221, 255, 127 };

const uint8_t * const Font_PixelOperatorMono_Regular_8[126 + 1 - 32] = {
static const uint8_t * const Font_PixelOperatorMono_Regular_8[126 + 1 - 32] = {
Font_PixelOperatorMono_Regular_8_glyph_32,
Font_PixelOperatorMono_Regular_8_glyph_33,
Font_PixelOperatorMono_Regular_8_glyph_34,
Expand Down Expand Up @@ -206,3 +206,11 @@ const uint8_t * const Font_PixelOperatorMono_Regular_8[126 + 1 - 32] = {
Font_PixelOperatorMono_Regular_8_glyph_125,
Font_PixelOperatorMono_Regular_8_glyph_126,
};

const font_info_t Font_PixelOperatorMono_Regular_8_info = {
.height = 8,
.max_height = 8,
.baseline = 1,
.glyph_data = Font_PixelOperatorMono_Regular_8,
.glyph_nonprintable = Font_PixelOperatorMono_Regular_8_glyph_nonprintable,
};
7 changes: 3 additions & 4 deletions core/embed/lib/fonts/font_pixeloperatormono_regular_8.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

#if TREZOR_FONT_BPP != 1
#error Wrong TREZOR_FONT_BPP (expected 1)
#endif
#define Font_PixelOperatorMono_Regular_8_HEIGHT 8

#define Font_PixelOperatorMono_Regular_8_MAX_HEIGHT 8
#define Font_PixelOperatorMono_Regular_8_BASELINE 1
extern const uint8_t* const Font_PixelOperatorMono_Regular_8[126 + 1 - 32];
extern const uint8_t Font_PixelOperatorMono_Regular_8_glyph_nonprintable[];
extern const font_info_t Font_PixelOperatorMono_Regular_8_info;
13 changes: 11 additions & 2 deletions core/embed/lib/fonts/font_roboto_bold_20.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

// clang-format off

Expand Down Expand Up @@ -104,9 +105,9 @@
/* } */ static const uint8_t Font_Roboto_Bold_20_glyph_125[] = { 7, 20, 7, 0, 16, 180, 3, 0, 0, 248, 79, 0, 0, 176, 239, 0, 0, 64, 255, 3, 0, 32, 255, 5, 0, 32, 255, 6, 0, 32, 255, 6, 0, 16, 255, 7, 0, 0, 252, 45, 0, 0, 210, 255, 2, 0, 210, 255, 2, 0, 252, 45, 0, 16, 255, 7, 0, 32, 255, 6, 0, 32, 255, 6, 0, 32, 255, 5, 0, 64, 255, 3, 0, 176, 239, 0, 0, 248, 79, 0, 0, 180, 3, 0, 0 };
/* ~ */ static const uint8_t Font_Roboto_Bold_20_glyph_126[] = { 11, 5, 13, 1, 8, 96, 254, 60, 0, 162, 9, 245, 255, 255, 6, 249, 12, 252, 108, 252, 255, 255, 6, 237, 3, 128, 255, 175, 0, 0, 0, 0, 65, 2, 0 };

/* ? */ const uint8_t Font_Roboto_Bold_20_glyph_nonprintable[] = { 10, 14, 10, 0, 14, 255, 40, 16, 163, 255, 79, 0, 0, 0, 247, 11, 16, 137, 0, 240, 8, 160, 255, 5, 192, 255, 255, 255, 4, 208, 255, 255, 175, 0, 243, 255, 255, 10, 16, 253, 255, 239, 0, 209, 255, 255, 143, 0, 251, 255, 255, 111, 16, 255, 255, 255, 255, 255, 255, 255, 255, 159, 65, 255, 255, 255, 47, 0, 252, 255, 255, 143, 64, 255, 255 };
/* ? */ static const uint8_t Font_Roboto_Bold_20_glyph_nonprintable[] = { 10, 14, 10, 0, 14, 255, 40, 16, 163, 255, 79, 0, 0, 0, 247, 11, 16, 137, 0, 240, 8, 160, 255, 5, 192, 255, 255, 255, 4, 208, 255, 255, 175, 0, 243, 255, 255, 10, 16, 253, 255, 239, 0, 209, 255, 255, 143, 0, 251, 255, 255, 111, 16, 255, 255, 255, 255, 255, 255, 255, 255, 159, 65, 255, 255, 255, 47, 0, 252, 255, 255, 143, 64, 255, 255 };

const uint8_t * const Font_Roboto_Bold_20[126 + 1 - 32] = {
static const uint8_t * const Font_Roboto_Bold_20[126 + 1 - 32] = {
Font_Roboto_Bold_20_glyph_32,
Font_Roboto_Bold_20_glyph_33,
Font_Roboto_Bold_20_glyph_34,
Expand Down Expand Up @@ -203,3 +204,11 @@ const uint8_t * const Font_Roboto_Bold_20[126 + 1 - 32] = {
Font_Roboto_Bold_20_glyph_125,
Font_Roboto_Bold_20_glyph_126,
};

const font_info_t Font_Roboto_Bold_20_info = {
.height = 20,
.max_height = 21,
.baseline = 4,
.glyph_data = Font_Roboto_Bold_20,
.glyph_nonprintable = Font_Roboto_Bold_20_glyph_nonprintable,
};
7 changes: 3 additions & 4 deletions core/embed/lib/fonts/font_roboto_bold_20.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

#if TREZOR_FONT_BPP != 4
#error Wrong TREZOR_FONT_BPP (expected 4)
#endif
#define Font_Roboto_Bold_20_HEIGHT 20

#define Font_Roboto_Bold_20_MAX_HEIGHT 21
#define Font_Roboto_Bold_20_BASELINE 4
extern const uint8_t* const Font_Roboto_Bold_20[126 + 1 - 32];
extern const uint8_t Font_Roboto_Bold_20_glyph_nonprintable[];
extern const font_info_t Font_Roboto_Bold_20_info;
13 changes: 11 additions & 2 deletions core/embed/lib/fonts/font_roboto_regular_20.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

// clang-format off

Expand Down Expand Up @@ -104,9 +105,9 @@
/* } */ static const uint8_t Font_Roboto_Regular_20_glyph_125[] = { 7, 20, 7, 0, 16, 152, 1, 0, 0, 228, 29, 0, 0, 48, 159, 0, 0, 0, 238, 0, 0, 0, 252, 0, 0, 0, 252, 0, 0, 0, 252, 0, 0, 0, 250, 2, 0, 0, 244, 27, 0, 0, 112, 255, 1, 0, 209, 143, 0, 0, 248, 5, 0, 0, 251, 1, 0, 0, 252, 0, 0, 0, 252, 0, 0, 0, 252, 0, 0, 0, 222, 0, 0, 80, 143, 0, 0, 229, 29, 0, 0, 152, 1, 0, 0 };
/* ~ */ static const uint8_t Font_Roboto_Regular_20_glyph_126[] = { 12, 4, 14, 1, 8, 64, 253, 109, 0, 32, 59, 243, 173, 254, 43, 161, 31, 249, 1, 144, 255, 255, 7, 50, 0, 0, 115, 56, 0 };

/* ? */ const uint8_t Font_Roboto_Regular_20_glyph_nonprintable[] = { 9, 14, 9, 0, 14, 255, 57, 16, 213, 255, 111, 16, 69, 16, 254, 14, 242, 255, 8, 247, 125, 250, 255, 12, 245, 255, 255, 255, 10, 248, 255, 255, 239, 1, 254, 255, 255, 46, 160, 255, 255, 255, 3, 250, 255, 255, 191, 96, 255, 255, 255, 143, 160, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 159, 160, 255, 255, 255, 159, 160, 255, 255 };
/* ? */ static const uint8_t Font_Roboto_Regular_20_glyph_nonprintable[] = { 9, 14, 9, 0, 14, 255, 57, 16, 213, 255, 111, 16, 69, 16, 254, 14, 242, 255, 8, 247, 125, 250, 255, 12, 245, 255, 255, 255, 10, 248, 255, 255, 239, 1, 254, 255, 255, 46, 160, 255, 255, 255, 3, 250, 255, 255, 191, 96, 255, 255, 255, 143, 160, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 159, 160, 255, 255, 255, 159, 160, 255, 255 };

const uint8_t * const Font_Roboto_Regular_20[126 + 1 - 32] = {
static const uint8_t * const Font_Roboto_Regular_20[126 + 1 - 32] = {
Font_Roboto_Regular_20_glyph_32,
Font_Roboto_Regular_20_glyph_33,
Font_Roboto_Regular_20_glyph_34,
Expand Down Expand Up @@ -203,3 +204,11 @@ const uint8_t * const Font_Roboto_Regular_20[126 + 1 - 32] = {
Font_Roboto_Regular_20_glyph_125,
Font_Roboto_Regular_20_glyph_126,
};

const font_info_t Font_Roboto_Regular_20_info = {
.height = 20,
.max_height = 22,
.baseline = 5,
.glyph_data = Font_Roboto_Regular_20,
.glyph_nonprintable = Font_Roboto_Regular_20_glyph_nonprintable,
};
7 changes: 3 additions & 4 deletions core/embed/lib/fonts/font_roboto_regular_20.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

#if TREZOR_FONT_BPP != 4
#error Wrong TREZOR_FONT_BPP (expected 4)
#endif
#define Font_Roboto_Regular_20_HEIGHT 20

#define Font_Roboto_Regular_20_MAX_HEIGHT 22
#define Font_Roboto_Regular_20_BASELINE 5
extern const uint8_t* const Font_Roboto_Regular_20[126 + 1 - 32];
extern const uint8_t Font_Roboto_Regular_20_glyph_nonprintable[];
extern const font_info_t Font_Roboto_Regular_20_info;
13 changes: 11 additions & 2 deletions core/embed/lib/fonts/font_robotomono_medium_20.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

// clang-format off

Expand Down Expand Up @@ -104,9 +105,9 @@
/* } */ static const uint8_t Font_RobotoMono_Medium_20_glyph_125[] = { 7, 20, 12, 3, 16, 117, 1, 0, 0, 249, 30, 0, 0, 112, 175, 0, 0, 16, 255, 0, 0, 0, 255, 2, 0, 0, 255, 3, 0, 0, 255, 3, 0, 0, 254, 4, 0, 0, 248, 28, 0, 0, 144, 255, 11, 0, 144, 255, 10, 0, 248, 28, 0, 0, 254, 4, 0, 0, 255, 3, 0, 0, 255, 3, 0, 0, 255, 2, 0, 32, 255, 0, 0, 144, 159, 0, 0, 250, 29, 0, 0, 100, 0, 0, 0 };
/* ~ */ static const uint8_t Font_RobotoMono_Medium_20_glyph_126[] = { 12, 5, 12, 0, 8, 64, 237, 76, 0, 32, 22, 242, 255, 255, 8, 144, 63, 248, 6, 229, 239, 253, 14, 149, 0, 32, 251, 239, 3, 0, 0, 0, 16, 2, 0 };

/* ? */ const uint8_t Font_RobotoMono_Medium_20_glyph_nonprintable[] = { 10, 16, 12, 1, 15, 255, 207, 153, 251, 255, 239, 3, 0, 16, 250, 47, 0, 102, 2, 208, 12, 176, 255, 14, 128, 174, 250, 255, 47, 112, 255, 255, 255, 13, 160, 255, 255, 255, 3, 242, 255, 255, 79, 16, 253, 255, 255, 5, 209, 255, 255, 255, 0, 251, 255, 255, 255, 34, 254, 255, 255, 255, 255, 255, 255, 255, 255, 153, 255, 255, 255, 175, 0, 250, 255, 255, 207, 0, 253, 255, 255, 255, 255, 255, 255 };
/* ? */ static const uint8_t Font_RobotoMono_Medium_20_glyph_nonprintable[] = { 10, 16, 12, 1, 15, 255, 207, 153, 251, 255, 239, 3, 0, 16, 250, 47, 0, 102, 2, 208, 12, 176, 255, 14, 128, 174, 250, 255, 47, 112, 255, 255, 255, 13, 160, 255, 255, 255, 3, 242, 255, 255, 79, 16, 253, 255, 255, 5, 209, 255, 255, 255, 0, 251, 255, 255, 255, 34, 254, 255, 255, 255, 255, 255, 255, 255, 255, 153, 255, 255, 255, 175, 0, 250, 255, 255, 207, 0, 253, 255, 255, 255, 255, 255, 255 };

const uint8_t * const Font_RobotoMono_Medium_20[126 + 1 - 32] = {
static const uint8_t * const Font_RobotoMono_Medium_20[126 + 1 - 32] = {
Font_RobotoMono_Medium_20_glyph_32,
Font_RobotoMono_Medium_20_glyph_33,
Font_RobotoMono_Medium_20_glyph_34,
Expand Down Expand Up @@ -203,3 +204,11 @@ const uint8_t * const Font_RobotoMono_Medium_20[126 + 1 - 32] = {
Font_RobotoMono_Medium_20_glyph_125,
Font_RobotoMono_Medium_20_glyph_126,
};

const font_info_t Font_RobotoMono_Medium_20_info = {
.height = 20,
.max_height = 22,
.baseline = 5,
.glyph_data = Font_RobotoMono_Medium_20,
.glyph_nonprintable = Font_RobotoMono_Medium_20_glyph_nonprintable,
};
7 changes: 3 additions & 4 deletions core/embed/lib/fonts/font_robotomono_medium_20.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

#if TREZOR_FONT_BPP != 4
#error Wrong TREZOR_FONT_BPP (expected 4)
#endif
#define Font_RobotoMono_Medium_20_HEIGHT 20

#define Font_RobotoMono_Medium_20_MAX_HEIGHT 22
#define Font_RobotoMono_Medium_20_BASELINE 5
extern const uint8_t* const Font_RobotoMono_Medium_20[126 + 1 - 32];
extern const uint8_t Font_RobotoMono_Medium_20_glyph_nonprintable[];
extern const font_info_t Font_RobotoMono_Medium_20_info;
13 changes: 11 additions & 2 deletions core/embed/lib/fonts/font_robotomono_medium_21.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

// clang-format off

Expand Down Expand Up @@ -104,9 +105,9 @@
/* } */ static const uint8_t Font_RobotoMono_Medium_21_glyph_125[] = { 8, 21, 13, 3, 17, 66, 0, 0, 0, 248, 45, 0, 0, 128, 223, 0, 0, 0, 254, 4, 0, 0, 252, 7, 0, 0, 252, 8, 0, 0, 252, 8, 0, 0, 251, 9, 0, 0, 248, 12, 0, 0, 225, 175, 4, 0, 16, 253, 63, 0, 160, 239, 42, 0, 245, 30, 0, 0, 250, 9, 0, 0, 252, 8, 0, 0, 252, 8, 0, 0, 252, 8, 0, 0, 254, 5, 0, 80, 239, 0, 0, 246, 95, 0, 0, 148, 3, 0, 0 };
/* ~ */ static const uint8_t Font_RobotoMono_Medium_21_glyph_126[] = { 12, 6, 13, 0, 9, 0, 82, 3, 0, 0, 0, 128, 255, 207, 2, 0, 155, 244, 191, 254, 111, 97, 191, 248, 5, 144, 255, 255, 79, 98, 0, 0, 197, 239, 6, 0, 0, 0, 0, 0, 0 };

/* ? */ const uint8_t Font_RobotoMono_Medium_21_glyph_nonprintable[] = { 11, 17, 13, 1, 16, 255, 255, 222, 254, 255, 255, 255, 42, 0, 32, 250, 255, 143, 0, 0, 0, 144, 255, 15, 48, 254, 46, 16, 255, 61, 195, 255, 143, 0, 255, 255, 255, 255, 143, 0, 255, 255, 255, 255, 30, 80, 255, 255, 255, 255, 3, 225, 255, 255, 255, 62, 16, 252, 255, 255, 255, 7, 208, 255, 255, 255, 255, 3, 246, 255, 255, 255, 255, 104, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 105, 253, 255, 255, 255, 239, 0, 244, 255, 255, 255, 255, 2, 248, 255, 255, 255, 255, 239, 255, 255, 255 };
/* ? */ static const uint8_t Font_RobotoMono_Medium_21_glyph_nonprintable[] = { 11, 17, 13, 1, 16, 255, 255, 222, 254, 255, 255, 255, 42, 0, 32, 250, 255, 143, 0, 0, 0, 144, 255, 15, 48, 254, 46, 16, 255, 61, 195, 255, 143, 0, 255, 255, 255, 255, 143, 0, 255, 255, 255, 255, 30, 80, 255, 255, 255, 255, 3, 225, 255, 255, 255, 62, 16, 252, 255, 255, 255, 7, 208, 255, 255, 255, 255, 3, 246, 255, 255, 255, 255, 104, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 105, 253, 255, 255, 255, 239, 0, 244, 255, 255, 255, 255, 2, 248, 255, 255, 255, 255, 239, 255, 255, 255 };

const uint8_t * const Font_RobotoMono_Medium_21[126 + 1 - 32] = {
static const uint8_t * const Font_RobotoMono_Medium_21[126 + 1 - 32] = {
Font_RobotoMono_Medium_21_glyph_32,
Font_RobotoMono_Medium_21_glyph_33,
Font_RobotoMono_Medium_21_glyph_34,
Expand Down Expand Up @@ -203,3 +204,11 @@ const uint8_t * const Font_RobotoMono_Medium_21[126 + 1 - 32] = {
Font_RobotoMono_Medium_21_glyph_125,
Font_RobotoMono_Medium_21_glyph_126,
};

const font_info_t Font_RobotoMono_Medium_21_info = {
.height = 21,
.max_height = 23,
.baseline = 5,
.glyph_data = Font_RobotoMono_Medium_21,
.glyph_nonprintable = Font_RobotoMono_Medium_21_glyph_nonprintable,
};
7 changes: 3 additions & 4 deletions core/embed/lib/fonts/font_robotomono_medium_21.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// This file is generated by core/tools/codegen/gen_font.py

#include <stdint.h>
#include "fonts_types.h"

#if TREZOR_FONT_BPP != 4
#error Wrong TREZOR_FONT_BPP (expected 4)
#endif
#define Font_RobotoMono_Medium_21_HEIGHT 21

#define Font_RobotoMono_Medium_21_MAX_HEIGHT 23
#define Font_RobotoMono_Medium_21_BASELINE 5
extern const uint8_t* const Font_RobotoMono_Medium_21[126 + 1 - 32];
extern const uint8_t Font_RobotoMono_Medium_21_glyph_nonprintable[];
extern const font_info_t Font_RobotoMono_Medium_21_info;
Loading

0 comments on commit 6e50231

Please sign in to comment.