Skip to content

Commit 62a929e

Browse files
Put fonts in Shared library to access them without syscall
1 parent ae295a0 commit 62a929e

File tree

4 files changed

+4
-21
lines changed

4 files changed

+4
-21
lines changed

include/shared_trampoline.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
#elif defined(TARGET_NANOX)
88
#define SHARED_TRAMPOLINE_ADDR 0x00210001
99
#elif defined(TARGET_NANOS2)
10-
#define SHARED_TRAMPOLINE_ADDR 0x00810001
10+
#define SHARED_TRAMPOLINE_ADDR 0x00808001
1111
#elif defined(TARGET_STAX)
12-
#define SHARED_TRAMPOLINE_ADDR 0x00818001
12+
#define SHARED_TRAMPOLINE_ADDR 0x00810001
1313
#elif defined(TARGET_FLEX)
14-
#define SHARED_TRAMPOLINE_ADDR 0x00818001
14+
#define SHARED_TRAMPOLINE_ADDR 0x00810001
1515
#endif

lib_nbgl/include/nbgl_fonts.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ typedef struct nbgl_unicode_ctx_s {
166166
/**********************
167167
* GLOBAL PROTOTYPES
168168
**********************/
169-
const nbgl_font_t *nbgl_font_getFont(unsigned int fontId);
170169
const nbgl_font_t *nbgl_getFont(nbgl_font_id_e fontId);
171170
uint16_t nbgl_getSingleLineTextWidth(nbgl_font_id_e fontId, const char *text);
172171
uint16_t nbgl_getSingleLineTextWidthInLen(nbgl_font_id_e fontId, const char *text, uint16_t maxLen);

lib_nbgl/src/nbgl_fonts.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ static nbgl_unicode_ctx_t unicodeCtx = {0};
4444
static const LANGUAGE_PACK *language_pack;
4545
#endif // HAVE_LANGUAGE_PACK
4646

47-
#if defined(BOLOS_OS_UPGRADER_APP)
4847
#ifdef SCREEN_SIZE_WALLET
4948
#ifdef TARGET_STAX
5049
#include "nbgl_font_inter_regular_24.inc"
@@ -74,8 +73,6 @@ const nbgl_font_t *const C_nbgl_fonts[] = {
7473
};
7574
const unsigned int C_nbgl_fonts_count = sizeof(C_nbgl_fonts) / sizeof(C_nbgl_fonts[0]);
7675

77-
#endif
78-
7976
#if (defined(HAVE_BOLOS) && !defined(BOLOS_OS_UPGRADER_APP))
8077
#if !defined(HAVE_LANGUAGE_PACK)
8178
const nbgl_font_unicode_t *const C_nbgl_fonts_unicode[] = {
@@ -116,7 +113,6 @@ bool hard_caesura = false;
116113
* @param fontId font ID
117114
* @return the found font or NULL
118115
*/
119-
#if defined(BOLOS_OS_UPGRADER_APP)
120116
const nbgl_font_t *nbgl_getFont(nbgl_font_id_e fontId)
121117
{
122118
unsigned int i = C_nbgl_fonts_count;
@@ -132,12 +128,7 @@ const nbgl_font_t *nbgl_getFont(nbgl_font_id_e fontId)
132128
// id not found
133129
return NULL;
134130
}
135-
#else
136-
const nbgl_font_t *nbgl_getFont(nbgl_font_id_e fontId)
137-
{
138-
return nbgl_font_getFont(fontId);
139-
}
140-
#endif // BOLOS_OS_UPGRADER_APP
131+
141132
/**
142133
* @brief Get the coming unicode value on the given UTF-8 string. If the value is a simple ASCII
143134
* character, is_unicode is set to false.

src/syscalls.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,6 @@ void nbgl_sideRefreshArea(nbgl_area_t *area, nbgl_post_refresh_t post_refresh)
181181
return;
182182
}
183183

184-
const nbgl_font_t *nbgl_font_getFont(unsigned int fontId)
185-
{
186-
unsigned int parameters[1];
187-
parameters[0] = (unsigned int) fontId;
188-
return (const nbgl_font_t *) SVC_Call(SYSCALL_nbgl_get_font_ID, parameters);
189-
}
190-
191184
void nbgl_screen_reinit(void)
192185
{
193186
unsigned int parameters[1];

0 commit comments

Comments
 (0)