1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00
lvgl/docs/others/imgfont.md
Xiang Xiao 4c4f954059
chore(style): remove the trailing space from all source files (#3188)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 11:25:51 +01:00

740 B

.. include:: /header.rst
:github_url: |github_link_base|/others/imgfont.md

Image font (imgfont)

Draw image in label or span obj with imgfont. This is often used to display Unicode emoji icons in text. Supported image formats: determined by LVGL image decoder.

Usage

Enable LV_USE_IMGFONT in lv_conf.h.

To create a new imgfont use lv_imgfont_create(height, path_cb).

height used to indicate the size of a imgfont. path_cb Used to get the image path of the specified unicode.

Use lv_imgfont_destroy(imgfont) to destroy a imgfont that is no longer used.

Example

.. include:: ../../examples/others/imgfont/index.rst

API

.. doxygenfile:: lv_imgfont.h
  :project: lvgl