# lv_vg_lite_bitmap_font_cache.h (/api/draw/vg_lite/lv_vg_lite_bitmap_font_cache_h)



<ApiSummary functions="3" />

Functions [#functions]

<ApiTabs items="[&#x22;Getters (1)&#x22;,&#x22;Other (2)&#x22;]">
  <ApiTab value="Getters (1)">
    <ApiMember kind="function" name="lv_vg_lite_bitmap_font_cache_get" file="draw/vg_lite/lv_vg_lite_bitmap_font_cache.h" line="56" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_bitmap_font_cache.h#L56">
      lv_vg_lite_bitmap_font_cache_get [#lv_vg_lite_bitmap_font_cache_get]

      Get the bitmap font cache entry for a given font and letter.

      ```c title=" " lineNumbers=1
      lv_draw_buf_t * lv_vg_lite_bitmap_font_cache_get(struct _lv_draw_vg_lite_unit_t *unit, const lv_font_glyph_dsc_t *g_dsc)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                                                  | Description                      |
      | ------- | ------------------------------------------------------------------------------------- | -------------------------------- |
      | `unit`  | <ApiLink name="_lv_draw_vg_lite_unit_t" display="struct _lv_draw_vg_lite_unit_t *" /> | pointer to the VG-Lite draw unit |
      | `g_dsc` | <ApiLink name="lv_font_glyph_dsc_t" display="const lv_font_glyph_dsc_t *" />          | pointer to the glyph descriptor  |

      **Returns:** <ApiLink name="lv_draw_buf_t" display="lv_draw_buf_t *" /> — pointer to the draw buffer containing the cached bitmap font glyph, or NULL if the glyph ID is 0 or if cache creation fails
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (2)">
    <ApiMember kind="function" name="lv_vg_lite_bitmap_font_cache_init" file="draw/vg_lite/lv_vg_lite_bitmap_font_cache.h" line="42" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_bitmap_font_cache.h#L42">
      lv_vg_lite_bitmap_font_cache_init [#lv_vg_lite_bitmap_font_cache_init]

      Initialize the bitmap font cache for VG-Lite draw unit.

      ```c title=" " lineNumbers=1
      void lv_vg_lite_bitmap_font_cache_init(struct _lv_draw_vg_lite_unit_t *unit, uint32_t cache_cnt)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name        | Type                                                                                  | Description                         |
      | ----------- | ------------------------------------------------------------------------------------- | ----------------------------------- |
      | `unit`      | <ApiLink name="_lv_draw_vg_lite_unit_t" display="struct _lv_draw_vg_lite_unit_t *" /> | pointer to the VG-Lite draw unit    |
      | `cache_cnt` | <ApiLink name="uint32_t" />                                                           | number of cache entries to allocate |
    </ApiMember>

    <ApiMember kind="function" name="lv_vg_lite_bitmap_font_cache_deinit" file="draw/vg_lite/lv_vg_lite_bitmap_font_cache.h" line="48" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_bitmap_font_cache.h#L48">
      lv_vg_lite_bitmap_font_cache_deinit [#lv_vg_lite_bitmap_font_cache_deinit]

      Deinitialize the bitmap font cache for VG-Lite draw unit.

      ```c title=" " lineNumbers=1
      void lv_vg_lite_bitmap_font_cache_deinit(struct _lv_draw_vg_lite_unit_t *unit)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                                                                  | Description                      |
      | ------ | ------------------------------------------------------------------------------------- | -------------------------------- |
      | `unit` | <ApiLink name="_lv_draw_vg_lite_unit_t" display="struct _lv_draw_vg_lite_unit_t *" /> | pointer to the VG-Lite draw unit |
    </ApiMember>
  </ApiTab>
</ApiTabs>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_font.h&#x22;]" transitiveIncludes="[&#x22;lv_area.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_types.h&#x22;]" />
