lv_freetype.h
Defines
-
LV_FREETYPE_F26DOT6_TO_INT(x)
-
LV_FREETYPE_F26DOT6_TO_FLOAT(x)
-
FT_FONT_STYLE_NORMAL
-
FT_FONT_STYLE_ITALIC
-
FT_FONT_STYLE_BOLD
Enums
-
enum lv_freetype_font_style_t
Values:
-
enumerator LV_FREETYPE_FONT_STYLE_NORMAL
-
enumerator LV_FREETYPE_FONT_STYLE_ITALIC
-
enumerator LV_FREETYPE_FONT_STYLE_BOLD
-
enumerator LV_FREETYPE_FONT_STYLE_NORMAL
Functions
-
lv_result_t lv_freetype_init(uint32_t max_glyph_cnt)
Initialize the freetype library.
- Returns:
LV_RESULT_OK on success, otherwise LV_RESULT_INVALID.
-
void lv_freetype_uninit(void)
Uninitialize the freetype library
-
lv_font_t *lv_freetype_font_create(const char *pathname, lv_freetype_font_render_mode_t render_mode, uint32_t size, lv_freetype_font_style_t style)
Create a freetype font.
- Parameters:
pathname – font file path.
render_mode – font render mode(see @lv_freetype_font_render_mode_t for details).
size – font size.
style – font style(see lv_freetype_font_style_t for details).
- Returns:
Created font, or NULL on failure.
-
void lv_freetype_font_delete(lv_font_t *font)
Delete a freetype font.
- Parameters:
font – freetype font to be deleted.
-
void lv_freetype_outline_add_event(lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data)
Register a callback function to generate outlines for FreeType fonts.
- Parameters:
cb – The callback function to be registered.
user_data – User data to be passed to the callback function.
- Returns:
The ID of the registered callback function, or a negative value on failure.