Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
nbgl_fonts.h File Reference
#include "nbgl_types.h"
#include "ux_loc.h"
Include dependency graph for nbgl_fonts.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nbgl_font_character_t
 fonts nicknames to be used for various wallet size targets (non-Nano) More...
 
struct  nbgl_font_t
 structure defining an ASCII font More...
 
struct  nbgl_font_unicode_character_t
 structure defining a unicode character (except the bitmap) More...
 
struct  nbgl_font_unicode_t
 structure defining a unicode font More...
 
struct  nbgl_unicode_ctx_s
 

Macros

#define PIC_CHAR(x)   ((const nbgl_font_character_t *) PIC(x))
 
#define PIC_BMP(x)   ((uint8_t const *) PIC(x))
 
#define BAGL_ENCODING_LATIN1   0
 
#define BAGL_ENCODING_UTF8   1
 
#define BAGL_ENCODING_DEFAULT   BAGL_ENCODING_UTF8
 
#define IS_UNICODE(__value)   ((__value) > 0xF0)
 

Typedefs

typedef struct nbgl_unicode_ctx_s nbgl_unicode_ctx_t
 

Enumerations

enum  nbgl_font_id_e {
  BAGL_FONT_INTER_REGULAR_24px , BAGL_FONT_INTER_SEMIBOLD_24px , BAGL_FONT_INTER_MEDIUM_32px , BAGL_FONT_INTER_REGULAR_24px_1bpp ,
  BAGL_FONT_INTER_SEMIBOLD_24px_1bpp , BAGL_FONT_INTER_MEDIUM_32px_1bpp , BAGL_FONT_OPEN_SANS_EXTRABOLD_11px_1bpp = 8u , BAGL_FONT_OPEN_SANS_LIGHT_16px_1bpp = 9u ,
  BAGL_FONT_OPEN_SANS_REGULAR_11px_1bpp = 10u , BAGL_FONT_INTER_REGULAR_28px = 11u , BAGL_FONT_INTER_SEMIBOLD_28px = 12u , BAGL_FONT_INTER_MEDIUM_36px = 13u ,
  BAGL_FONT_INTER_REGULAR_28px_1bpp = 14u , BAGL_FONT_INTER_SEMIBOLD_28px_1bpp = 15u , BAGL_FONT_INTER_MEDIUM_36px_1bpp = 16u , BAGL_FONT_NANOTEXT_MEDIUM_18px_1bpp = 17u ,
  BAGL_FONT_NANOTEXT_BOLD_18px_1bpp = 18u , BAGL_FONT_NANODISPLAY_SEMIBOLD_24px_1bpp = 19u , BAGL_FONT_LAST
}
 

Functions

const nbgl_font_tnbgl_getFont (nbgl_font_id_e fontId)
 
uint16_t nbgl_getSingleLineTextWidth (nbgl_font_id_e fontId, const char *text)
 
uint16_t nbgl_getSingleLineTextWidthInLen (nbgl_font_id_e fontId, const char *text, uint16_t maxLen)
 
uint16_t nbgl_getTextWidth (nbgl_font_id_e fontId, const char *text)
 
uint8_t nbgl_getCharWidth (nbgl_font_id_e fontId, const char *text)
 
uint8_t nbgl_getFontHeight (nbgl_font_id_e fontId)
 
uint8_t nbgl_getFontLineHeight (nbgl_font_id_e fontId)
 
uint16_t nbgl_getTextNbLines (const char *text)
 
uint16_t nbgl_getTextHeight (nbgl_font_id_e fontId, const char *text)
 
uint16_t nbgl_getTextLength (const char *text)
 
void nbgl_getTextMaxLenAndWidth (nbgl_font_id_e fontId, const char *text, uint16_t maxWidth, uint16_t *len, uint16_t *width, bool wrapping)
 
uint16_t nbgl_getTextNbLinesInWidth (nbgl_font_id_e fontId, const char *text, uint16_t maxWidth, bool wrapping)
 
uint16_t nbgl_getTextHeightInWidth (nbgl_font_id_e fontId, const char *text, uint16_t maxWidth, bool wrapping)
 
bool nbgl_getTextMaxLenAndWidthFromEnd (nbgl_font_id_e fontId, const char *text, uint16_t maxWidth, uint16_t *len, uint16_t *width)
 
bool nbgl_getTextMaxLenInNbLines (nbgl_font_id_e fontId, const char *text, uint16_t maxWidth, uint16_t maxNbLines, uint16_t *len, bool wrapping)
 
void nbgl_textWrapOnNbLines (nbgl_font_id_e fontId, char *text, uint16_t maxWidth, uint8_t nbLines)
 
void nbgl_textReduceOnNbLines (nbgl_font_id_e fontId, const char *origText, uint16_t maxWidth, uint8_t nbLines, char *reducedText, uint16_t reducedTextLen)
 
uint8_t nbgl_getTextNbPagesInWidth (nbgl_font_id_e fontId, const char *text, uint8_t nbLinesPerPage, uint16_t maxWidth)
 
uint32_t nbgl_popUnicodeChar (const uint8_t **text, uint16_t *text_length, bool *is_unicode)
 
nbgl_unicode_ctx_tnbgl_getUnicodeFont (nbgl_font_id_e font_id)
 
const nbgl_font_unicode_character_tnbgl_getUnicodeFontCharacter (uint32_t unicode)
 
uint32_t nbgl_getUnicodeFontCharacterByteCount (void)
 
void nbgl_refreshUnicodeFont (const LANGUAGE_PACK *lp)
 

Detailed Description

Fonts types of the new BOLOS Graphical Library

Definition in file nbgl_fonts.h.

Macro Definition Documentation

◆ BAGL_ENCODING_DEFAULT

#define BAGL_ENCODING_DEFAULT   BAGL_ENCODING_UTF8

Definition at line 97 of file nbgl_fonts.h.

◆ BAGL_ENCODING_LATIN1

#define BAGL_ENCODING_LATIN1   0

Definition at line 95 of file nbgl_fonts.h.

◆ BAGL_ENCODING_UTF8

#define BAGL_ENCODING_UTF8   1

Definition at line 96 of file nbgl_fonts.h.

◆ IS_UNICODE

#define IS_UNICODE (   __value)    ((__value) > 0xF0)

Definition at line 220 of file nbgl_fonts.h.

◆ PIC_BMP

#define PIC_BMP (   x)    ((uint8_t const *) PIC(x))

Definition at line 24 of file nbgl_fonts.h.

◆ PIC_CHAR

#define PIC_CHAR (   x)    ((const nbgl_font_character_t *) PIC(x))

Definition at line 23 of file nbgl_fonts.h.

Typedef Documentation

◆ nbgl_unicode_ctx_t

Enumeration Type Documentation

◆ nbgl_font_id_e

Enumerator
BAGL_FONT_INTER_REGULAR_24px 
BAGL_FONT_INTER_SEMIBOLD_24px 
BAGL_FONT_INTER_MEDIUM_32px 
BAGL_FONT_INTER_REGULAR_24px_1bpp 
BAGL_FONT_INTER_SEMIBOLD_24px_1bpp 
BAGL_FONT_INTER_MEDIUM_32px_1bpp 
BAGL_FONT_OPEN_SANS_EXTRABOLD_11px_1bpp 
BAGL_FONT_OPEN_SANS_LIGHT_16px_1bpp 
BAGL_FONT_OPEN_SANS_REGULAR_11px_1bpp 
BAGL_FONT_INTER_REGULAR_28px 
BAGL_FONT_INTER_SEMIBOLD_28px 
BAGL_FONT_INTER_MEDIUM_36px 
BAGL_FONT_INTER_REGULAR_28px_1bpp 
BAGL_FONT_INTER_SEMIBOLD_28px_1bpp 
BAGL_FONT_INTER_MEDIUM_36px_1bpp 
BAGL_FONT_NANOTEXT_MEDIUM_18px_1bpp 
BAGL_FONT_NANOTEXT_BOLD_18px_1bpp 
BAGL_FONT_NANODISPLAY_SEMIBOLD_24px_1bpp 
BAGL_FONT_LAST 

Definition at line 132 of file nbgl_fonts.h.

Function Documentation

◆ nbgl_getCharWidth()

uint8_t nbgl_getCharWidth ( nbgl_font_id_e  fontId,
const char *  text 
)

◆ nbgl_getFont()

const nbgl_font_t * nbgl_getFont ( nbgl_font_id_e  fontId)

◆ nbgl_getFontHeight()

uint8_t nbgl_getFontHeight ( nbgl_font_id_e  fontId)

◆ nbgl_getFontLineHeight()

uint8_t nbgl_getFontLineHeight ( nbgl_font_id_e  fontId)

◆ nbgl_getSingleLineTextWidth()

uint16_t nbgl_getSingleLineTextWidth ( nbgl_font_id_e  fontId,
const char *  text 
)

◆ nbgl_getSingleLineTextWidthInLen()

uint16_t nbgl_getSingleLineTextWidthInLen ( nbgl_font_id_e  fontId,
const char *  text,
uint16_t  maxLen 
)

◆ nbgl_getTextHeight()

uint16_t nbgl_getTextHeight ( nbgl_font_id_e  fontId,
const char *  text 
)

◆ nbgl_getTextHeightInWidth()

uint16_t nbgl_getTextHeightInWidth ( nbgl_font_id_e  fontId,
const char *  text,
uint16_t  maxWidth,
bool  wrapping 
)

◆ nbgl_getTextLength()

uint16_t nbgl_getTextLength ( const char *  text)

◆ nbgl_getTextMaxLenAndWidth()

void nbgl_getTextMaxLenAndWidth ( nbgl_font_id_e  fontId,
const char *  text,
uint16_t  maxWidth,
uint16_t *  len,
uint16_t *  width,
bool  wrapping 
)

◆ nbgl_getTextMaxLenAndWidthFromEnd()

bool nbgl_getTextMaxLenAndWidthFromEnd ( nbgl_font_id_e  fontId,
const char *  text,
uint16_t  maxWidth,
uint16_t *  len,
uint16_t *  width 
)

◆ nbgl_getTextMaxLenInNbLines()

bool nbgl_getTextMaxLenInNbLines ( nbgl_font_id_e  fontId,
const char *  text,
uint16_t  maxWidth,
uint16_t  maxNbLines,
uint16_t *  len,
bool  wrapping 
)

◆ nbgl_getTextNbLines()

uint16_t nbgl_getTextNbLines ( const char *  text)

◆ nbgl_getTextNbLinesInWidth()

uint16_t nbgl_getTextNbLinesInWidth ( nbgl_font_id_e  fontId,
const char *  text,
uint16_t  maxWidth,
bool  wrapping 
)

◆ nbgl_getTextNbPagesInWidth()

uint8_t nbgl_getTextNbPagesInWidth ( nbgl_font_id_e  fontId,
const char *  text,
uint8_t  nbLinesPerPage,
uint16_t  maxWidth 
)

◆ nbgl_getTextWidth()

uint16_t nbgl_getTextWidth ( nbgl_font_id_e  fontId,
const char *  text 
)

◆ nbgl_getUnicodeFont()

nbgl_unicode_ctx_t * nbgl_getUnicodeFont ( nbgl_font_id_e  font_id)

◆ nbgl_getUnicodeFontCharacter()

const nbgl_font_unicode_character_t * nbgl_getUnicodeFontCharacter ( uint32_t  unicode)

◆ nbgl_getUnicodeFontCharacterByteCount()

uint32_t nbgl_getUnicodeFontCharacterByteCount ( void  )

◆ nbgl_popUnicodeChar()

uint32_t nbgl_popUnicodeChar ( const uint8_t **  text,
uint16_t *  text_length,
bool *  is_unicode 
)

◆ nbgl_refreshUnicodeFont()

void nbgl_refreshUnicodeFont ( const LANGUAGE_PACK *  lp)

◆ nbgl_textReduceOnNbLines()

void nbgl_textReduceOnNbLines ( nbgl_font_id_e  fontId,
const char *  origText,
uint16_t  maxWidth,
uint8_t  nbLines,
char *  reducedText,
uint16_t  reducedTextLen 
)

◆ nbgl_textWrapOnNbLines()

void nbgl_textWrapOnNbLines ( nbgl_font_id_e  fontId,
char *  text,
uint16_t  maxWidth,
uint8_t  nbLines 
)