lv_binfont_loader.h
API reference for lv_binfont_loader.h
Summary
Functions
lv_binfont_create
Loads a lv_font_t object from a binary font file
lv_font_t * lv_binfont_create(const char *path)| Name | Type | Description |
|---|---|---|
path | const char * | path to font file |
Returns: lv_font_t * — pointer to font where to load
lv_binfont_create_ex
Loads a lv_font_t object from a binary font file with additional options.
lv_font_t * lv_binfont_create_ex(const lv_binfont_dsc_t *dsc)| Name | Type | Description |
|---|---|---|
dsc | const lv_binfont_dsc_t * | describes the font source and how to load it |
Returns: lv_font_t * — pointer to the loaded font or NULL on error
lv_binfont_create_from_buffer
Loads a lv_font_t object from a memory buffer containing the binary font file. Requires LV_USE_FS_MEMFS
lv_font_t * lv_binfont_create_from_buffer(void *buffer, uint32_t size)| Name | Type | Description |
|---|---|---|
buffer | void * | address of the font file in the memory |
size | uint32_t | size of the font file buffer |
Returns: lv_font_t * — pointer to font where to load
lv_binfont_destroy
Frees the memory allocated by the lv_binfont_create() function
void lv_binfont_destroy(lv_font_t *font)| Name | Type | Description |
|---|---|---|
font | lv_font_t * | lv_font_t object created by the lv_binfont_create function May be NULL. |
Structs
struct
lv_binfont_font_src_t
| Member | Type | Description |
|---|---|---|
font_size | uint32_t | Size of the font in pixels |
path | const char * | Path to font file |
buffer | const void * | Address of the font file in the memory |
buffer_size | uint32_t | Size of the font file buffer |
dynamic_glyph_load | bool | Load the glyph bitmaps on demand. See lv_binfont_dsc_t |
struct
lv_binfont_dsc_t
Describes how a binary font should be loaded
| Member | Type | Description |
|---|---|---|
path | const char * | Path to the font file. If NULL the font is loaded from buffer. |
buffer | const void * | Address of the font file in the memory. Used only if path is NULL. Requires LV_USE_FS_MEMFS. |
buffer_size | uint32_t | Size of the font file buffer |
dynamic_glyph_load | bool | if true the glyph bitmaps are not loaded into RAM when the font is created, instead the glyph is loaded from the file during rendering when the glyph is drawn |
Used by 1 function
lv_binfont_create_ex— paramdsc
Variables
lv_binfont_font_class
const lv_font_class_t lv_binfont_font_classDependencies
Last updated on