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.

参数:
  • data -- the data pointer

  • data_size -- the data size

  • font_size -- the font size in pixel

返回:

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.

参数:
  • 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

返回:

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

备注

the font bitmap cache and glyph cache will be flushed.

参数:
  • 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()

参数:

font -- the font object