lv_font_manager.h
API reference for lv_font_manager.h
Summary
Functions
lv_font_manager_create
Create main font manager.
lv_font_manager_t * lv_font_manager_create(uint32_t recycle_cache_size)| Name | Type | Description |
|---|---|---|
recycle_cache_size | uint32_t | number of fonts that were recently deleted from the cache. |
Returns: lv_font_manager_t * — pointer to main font manager.
lv_font_manager_delete
Delete main font manager.
bool lv_font_manager_delete(lv_font_manager_t *manager)| Name | Type | Description |
|---|---|---|
manager | lv_font_manager_t * | pointer to main font manager. |
Returns: bool — return true if the deletion was successful.
lv_font_manager_add_src
Add font resource.
bool lv_font_manager_add_src(lv_font_manager_t *manager, const char *name, const void *src, const lv_font_class_t *class_p)| Name | Type | Description |
|---|---|---|
manager | lv_font_manager_t * | pointer to main font manager. |
name | const char * | font name. |
src | const void * | font source. Need to strictly correspond to the font class. |
class_p | const lv_font_class_t * | font class. eg. lv_freetype_font_class, lv_builtin_font_class. |
Returns: bool — return true if the add was successful.
lv_font_manager_add_src_static
Add font resource with static memory.
bool lv_font_manager_add_src_static(lv_font_manager_t *manager, const char *name, const void *src, const lv_font_class_t *class_p)| Name | Type | Description |
|---|---|---|
manager | lv_font_manager_t * | pointer to main font manager. |
name | const char * | font name. It cannot be a local variable. |
src | const void * | font source. Need to strictly correspond to the font class. And it cannot be a local variable. |
class_p | const lv_font_class_t * | font class. E.g. lv_freetype_font_class, lv_builtin_font_class. |
Returns: bool — return true if the add was successful.
lv_font_manager_remove_src
Remove font resource.
bool lv_font_manager_remove_src(lv_font_manager_t *manager, const char *name)| Name | Type | Description |
|---|---|---|
manager | lv_font_manager_t * | pointer to main font manager. |
name | const char * | font name. |
Returns: bool — return true if the remove was successful.
lv_font_manager_create_font
Create font.
lv_font_t * lv_font_manager_create_font(lv_font_manager_t *manager, const char *font_family, uint32_t render_mode, uint32_t size, uint32_t style, lv_font_kerning_t kerning)| Name | Type | Description |
|---|---|---|
manager | lv_font_manager_t * | pointer to main font manager. |
font_family | const char * | font family name. Matches the font resource name, using commas to separate different names. E.g. "my_font_1,my_font_2". |
render_mode | uint32_t | font render mode. see lv_freetype_font_render_mode_t. |
size | uint32_t | font size in pixel. |
style | uint32_t | font style. see lv_freetype_font_style_t. |
kerning | lv_font_kerning_t | kerning mode. see lv_font_kerning_t. |
Returns: lv_font_t * — point to the created font.
lv_font_manager_delete_font
Delete font.
void lv_font_manager_delete_font(lv_font_manager_t *manager, lv_font_t *font)| Name | Type | Description |
|---|---|---|
manager | lv_font_manager_t * | pointer to main font manager. |
font | lv_font_t * | point to the font. |
Dependencies
How is this guide?
Last updated on