lv_tiny_ttf.h

Functions

lv_font_t *lv_tiny_ttf_create_data(const void *data, size_t data_size, int32_t font_size)

Create a font from the specified data pointer with the specified line height.

Parameters:
  • data -- the data pointer

  • data_size -- the data size

  • font_size -- the font size in pixel

Returns:

a font object

lv_font_t *lv_tiny_ttf_create_data_ex(const void *data, size_t data_size, int32_t font_size, lv_font_kerning_t kerning, size_t cache_size)

Create a font from the specified data pointer with the specified line height and the specified cache size.

Parameters:
  • data -- the data pointer

  • data_size -- the data size

  • font_size -- the font size in pixel

  • kerning -- kerning value in pixel

  • cache_size -- the cache size in count

Returns:

void lv_tiny_ttf_set_size(lv_font_t *font, int32_t font_size)

Set the size of the font to a new font_size

Note

the font bitmap cache and glyph cache will be flushed.

Parameters:
  • font -- the font object

  • font_size -- the font size in pixel

void lv_tiny_ttf_destroy(lv_font_t *font)

Destroy a font previously created with lv_tiny_ttf_create_xxxx()

Parameters:

font -- the font object