# lv_font.h (/api/font/lv_font_h)



<RelatedHeaders name="lv_font_private.h" isPrivate="false" />

<ApiSummary functions="10" enums="3" structs="4" macros="1" variables="1" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (1)&#x22;,&#x22;Getters (6)&#x22;,&#x22;Other (3)&#x22;]">
  <ApiTab value="Setters (1)">
    <ApiMember kind="function" name="lv_font_set_kerning" file="font/lv_font.h" line="251" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L251">
      lv_font_set_kerning [#lv_font_set_kerning]

      Configure the use of kerning information stored in a font

      ```c title=" " lineNumbers=1
      void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning)
      ```

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

      | Name      | Type                                               | Description                                                  |
      | --------- | -------------------------------------------------- | ------------------------------------------------------------ |
      | `font`    | <ApiLink name="lv_font_t" display="lv_font_t *" /> | pointer to a font                                            |
      | `kerning` | <ApiLink name="lv_font_kerning_t" />               | `LV_FONT_KERNING_NORMAL` (default) or `LV_FONT_KERNING_NONE` |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (6)">
    <ApiMember kind="function" name="lv_font_get_glyph_bitmap" file="font/lv_font.h" line="200" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L200">
      lv_font_get_glyph_bitmap [#lv_font_get_glyph_bitmap]

      Return with the bitmap of a font. It always converts the normal fonts to A8 format in a draw\_buf with LV\_DRAW\_BUF\_ALIGN and LV\_DRAW\_BUF\_STRIDE\_ALIGN

      ```c title=" " lineNumbers=1
      const void * lv_font_get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf)
      ```

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

      | Name       | Type                                                                   | Description                                                                                     |
      | ---------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
      | `g_dsc`    | <ApiLink name="lv_font_glyph_dsc_t" display="lv_font_glyph_dsc_t *" /> | the glyph descriptor including which font to use, which supply the glyph\_index and the format. |
      | `draw_buf` | <ApiLink name="lv_draw_buf_t" display="lv_draw_buf_t *" />             | a draw buffer that can be used to store the bitmap of the glyph.                                |

      **Returns:** `const void *` — pointer to the glyph's data. It can be a draw buffer for bitmap fonts or an image source for imgfonts.

      <Callout type="info">
        You must call <ApiLink name="lv_font_get_glyph_dsc" display="lv_font_get_glyph_dsc()" /> to get `g_dsc` (<ApiLink name="lv_font_glyph_dsc_t" />) before you can call this function.
      </Callout>
    </ApiMember>

    <ApiMember kind="function" name="lv_font_get_glyph_static_bitmap" file="font/lv_font.h" line="210" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L210">
      lv_font_get_glyph_static_bitmap [#lv_font_get_glyph_static_bitmap]

      Return the bitmap as it is. It works only if the font stores the bitmap in a non-volitile memory.

      ```c title=" " lineNumbers=1
      const void * lv_font_get_glyph_static_bitmap(lv_font_glyph_dsc_t *g_dsc)
      ```

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

      | Name    | Type                                                                   | Description                                                                                     |
      | ------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
      | `g_dsc` | <ApiLink name="lv_font_glyph_dsc_t" display="lv_font_glyph_dsc_t *" /> | the glyph descriptor including which font to use, which supply the glyph\_index and the format. |

      **Returns:** `const void *` — the bitmap as it is
    </ApiMember>

    <ApiMember kind="function" name="lv_font_get_glyph_dsc" file="font/lv_font.h" line="221" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L221">
      lv_font_get_glyph_dsc [#lv_font_get_glyph_dsc]

      Get the descriptor of a glyph

      ```c title=" " lineNumbers=1
      bool lv_font_get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next)
      ```

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

      | Name          | Type                                                                   | Description                                      |
      | ------------- | ---------------------------------------------------------------------- | ------------------------------------------------ |
      | `font`        | <ApiLink name="lv_font_t" display="const lv_font_t *" />               | pointer to font                                  |
      | `dsc_out`     | <ApiLink name="lv_font_glyph_dsc_t" display="lv_font_glyph_dsc_t *" /> | store the result descriptor here                 |
      | `letter`      | <ApiLink name="uint32_t" />                                            | a UNICODE letter code                            |
      | `letter_next` | <ApiLink name="uint32_t" />                                            | the next letter after `letter`. Used for kerning |

      **Returns:** <ApiLink name="bool" /> — true: descriptor is successfully loaded into `dsc_out`. false: the letter was not found, no data is loaded to `dsc_out`
    </ApiMember>

    <ApiMember kind="function" name="lv_font_get_glyph_width" file="font/lv_font.h" line="237" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L237">
      lv_font_get_glyph_width [#lv_font_get_glyph_width]

      Get the width of a glyph with kerning

      ```c title=" " lineNumbers=1
      uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next)
      ```

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

      | Name          | Type                                                     | Description                                      |
      | ------------- | -------------------------------------------------------- | ------------------------------------------------ |
      | `font`        | <ApiLink name="lv_font_t" display="const lv_font_t *" /> | pointer to a font                                |
      | `letter`      | <ApiLink name="uint32_t" />                              | a UNICODE letter                                 |
      | `letter_next` | <ApiLink name="uint32_t" />                              | the next letter after `letter`. Used for kerning |

      **Returns:** <ApiLink name="uint16_t" /> — the width of the glyph
    </ApiMember>

    <ApiMember kind="function" name="lv_font_get_line_height" file="font/lv_font.h" line="244" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L244">
      lv_font_get_line_height [#lv_font_get_line_height]

      Get the line height of a font. All characters fit into this height

      ```c title=" " lineNumbers=1
      int32_t lv_font_get_line_height(const lv_font_t *font)
      ```

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

      | Name   | Type                                                     | Description       |
      | ------ | -------------------------------------------------------- | ----------------- |
      | `font` | <ApiLink name="lv_font_t" display="const lv_font_t *" /> | pointer to a font |

      **Returns:** <ApiLink name="int32_t" /> — the height of a font
    </ApiMember>

    <ApiMember kind="function" name="lv_font_get_default" file="font/lv_font.h" line="257" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L257">
      lv_font_get_default [#lv_font_get_default]

      Get the default font, defined by LV\_FONT\_DEFAULT

      ```c title=" " lineNumbers=1
      const lv_font_t * lv_font_get_default(void)
      ```

      **Returns:** <ApiLink name="lv_font_t" display="const lv_font_t *" /> — return pointer to the default font
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (3)">
    <ApiMember kind="function" name="lv_font_glyph_release_draw_data" file="font/lv_font.h" line="228" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L228">
      lv_font_glyph_release_draw_data [#lv_font_glyph_release_draw_data]

      Release the bitmap of a font.

      ```c title=" " lineNumbers=1
      void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t *g_dsc)
      ```

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

      | Name    | Type                                                                   | Description                                                                                     |
      | ------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
      | `g_dsc` | <ApiLink name="lv_font_glyph_dsc_t" display="lv_font_glyph_dsc_t *" /> | the glyph descriptor including which font to use, which supply the glyph\_index and the format. |

      <Callout type="info">
        You must call <ApiLink name="lv_font_get_glyph_dsc" display="lv_font_get_glyph_dsc()" /> to get `g_dsc` (<ApiLink name="lv_font_glyph_dsc_t" />) before you can call this function.
      </Callout>
    </ApiMember>

    <ApiMember kind="function" name="lv_font_info_is_equal" file="font/lv_font.h" line="265" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L265">
      lv_font_info_is_equal [#lv_font_info_is_equal]

      Compare font information.

      ```c title=" " lineNumbers=1
      bool lv_font_info_is_equal(const lv_font_info_t *ft_info_1, const lv_font_info_t *ft_info_2)
      ```

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

      | Name        | Type                                                               | Description         |
      | ----------- | ------------------------------------------------------------------ | ------------------- |
      | `ft_info_1` | <ApiLink name="lv_font_info_t" display="const lv_font_info_t *" /> | font information 1. |
      | `ft_info_2` | <ApiLink name="lv_font_info_t" display="const lv_font_info_t *" /> | font information 2. |

      **Returns:** <ApiLink name="bool" /> — return true if the fonts are equal.
    </ApiMember>

    <ApiMember kind="function" name="lv_font_has_static_bitmap" file="font/lv_font.h" line="272" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L272">
      lv_font_has_static_bitmap [#lv_font_has_static_bitmap]

      Checks if a font has a static rendering bitmap.

      ```c title=" " lineNumbers=1
      bool lv_font_has_static_bitmap(const lv_font_t *font)
      ```

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

      | Name   | Type                                                     | Description       |
      | ------ | -------------------------------------------------------- | ----------------- |
      | `font` | <ApiLink name="lv_font_t" display="const lv_font_t *" /> | pointer to a font |

      **Returns:** <ApiLink name="bool" /> — return true if the font has a bitmap generated for static rendering.
    </ApiMember>
  </ApiTab>
</ApiTabs>

Enums [#enums]

<ApiMember kind="enum" name="lv_font_glyph_format_t" file="font/lv_font.h" line="36" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L36">
  lv_font_glyph_format_t [#lv_font_glyph_format_t]

  The font format.

  | Name                          | Value  | Description                             |
  | ----------------------------- | ------ | --------------------------------------- |
  | `LV_FONT_GLYPH_FORMAT_NONE`   | `0`    | Maybe not visible Legacy simple formats |
  | `LV_FONT_GLYPH_FORMAT_A1`     | `0x01` | 1 bit per pixel                         |
  | `LV_FONT_GLYPH_FORMAT_A2`     | `0x02` | 2 bit per pixel                         |
  | `LV_FONT_GLYPH_FORMAT_A3`     | `0x03` | 3 bit per pixel                         |
  | `LV_FONT_GLYPH_FORMAT_A4`     | `0x04` | 4 bit per pixel                         |
  | `LV_FONT_GLYPH_FORMAT_A8`     | `0x08` | 8 bit per pixel                         |
  | `LV_FONT_GLYPH_FORMAT_IMAGE`  | `0x19` | Image format Advanced formats           |
  | `LV_FONT_GLYPH_FORMAT_VECTOR` | `0x1A` | Vectorial format                        |
  | `LV_FONT_GLYPH_FORMAT_SVG`    | `0x1B` | SVG format                              |
  | `LV_FONT_GLYPH_FORMAT_CUSTOM` | `0xFF` | Custom format                           |
</ApiMember>

<ApiMember kind="enum" name="lv_font_subpx_t" file="font/lv_font.h" line="78" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L78">
  lv_font_subpx_t [#lv_font_subpx_t]

  The bitmaps might be upscaled by 3 to achieve subpixel rendering.

  | Name                 |
  | -------------------- |
  | `LV_FONT_SUBPX_NONE` |
  | `LV_FONT_SUBPX_HOR`  |
  | `LV_FONT_SUBPX_VER`  |
  | `LV_FONT_SUBPX_BOTH` |
</ApiMember>

<ApiMember kind="enum" name="lv_font_kerning_t" file="font/lv_font.h" line="86" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L86">
  lv_font_kerning_t [#lv_font_kerning_t]

  Adjust letter spacing for specific character pairs.

  | Name                     |
  | ------------------------ |
  | `LV_FONT_KERNING_NORMAL` |
  | `LV_FONT_KERNING_NONE`   |
</ApiMember>

<TypeUsedBy name="lv_font_kerning_t" count="3">
  * `lv_font_manager_create_font` — param `kerning`
  * `lv_font_set_kerning` — param `kerning`
  * `lv_tiny_ttf_create_data_ex` — param `kerning`
</TypeUsedBy>

Structs [#structs]

<ApiMember kind="struct" name="lv_font_glyph_dsc_t">
  lv_font_glyph_dsc_t [#lv_font_glyph_dsc_t]

  Describes the properties of a glyph.

  | Member                 | Type                                                                       | Description                                                                                                                   |
  | ---------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
  | `resolved_font`        | <ApiLink name="lv_font_t" display="const lv_font_t *" />                   | Pointer to a font where the glyph was actually found after handling fallbacks                                                 |
  | `entry`                | <ApiLink name="lv_cache_entry_t" display="lv_cache_entry_t *" />           | The cache entry of the glyph draw data. Used by the font cache                                                                |
  | `index`                | <ApiLink name="uint32_t" />                                                | Glyph descriptor index                                                                                                        |
  | `src`                  | `const void *`                                                             | Pointer to the source data used by image fonts                                                                                |
  | `gid`                  | <ApiLink name="lv_font_glyph_dsc_t" display="union lv_font_glyph_dsc_t" /> | The index of the glyph in the font file. Used by the font cache                                                               |
  | `format`               | <ApiLink name="lv_font_glyph_format_t" />                                  | Font format of the glyph see lv\_font\_glyph\_format\_t                                                                       |
  | `outline_stroke_width` | <ApiLink name="int32_t" />                                                 | used with freetype vector fonts - width of the letter border                                                                  |
  | `adv_w`                | <ApiLink name="uint16_t" />                                                | The glyph needs this space. Draw the next glyph after this width.                                                             |
  | `box_w`                | <ApiLink name="uint16_t" />                                                | Width of the glyph's bounding box                                                                                             |
  | `box_h`                | <ApiLink name="uint16_t" />                                                | Height of the glyph's bounding box                                                                                            |
  | `ofs_x`                | <ApiLink name="int16_t" />                                                 | x offset of the bounding box                                                                                                  |
  | `ofs_y`                | <ApiLink name="int16_t" />                                                 | y offset of the bounding box                                                                                                  |
  | `stride`               | <ApiLink name="uint16_t" />                                                | Bytes in each line. If 0 than there is no padding at the end of the line.                                                     |
  | `is_placeholder`       | <ApiLink name="uint8_t" />                                                 | Glyph is missing. But placeholder will still be displayed                                                                     |
  | `req_raw_bitmap`       | <ApiLink name="uint8_t" />                                                 | 0: Get bitmap should return an A8 or ARGB8888 image. 1: return the bitmap as it is (Maybe A1/2/4 or any proprietary formats). |
</ApiMember>

<TypeUsedBy name="lv_font_glyph_dsc_t" count="9">
  * `lv_vg_lite_bitmap_font_cache_get` — param `g_dsc`
  * `lv_font_get_bitmap_fmt_txt` — param `g_dsc`
  * `lv_font_get_glyph_dsc_fmt_txt` — param `dsc_out`
  * `lv_font_get_glyph_bitmap` — param `g_dsc`
  * `lv_font_get_glyph_static_bitmap` — param `g_dsc`
  * `lv_font_get_glyph_dsc` — param `dsc_out`
  * `lv_font_glyph_release_draw_data` — param `g_dsc`
  * `lv_font_glyph_dsc_compare` — param `lhs`
  * `lv_font_glyph_dsc_compare` — param `rhs`
</TypeUsedBy>

<ApiMember kind="struct" name="_lv_font_t">
  \_lv_font_t [#_lv_font_t]

  Describe the properties of a font

  | Member                | Type                                                                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
  | --------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | `dsc`                 | `const void *`                                                                                        | Store implementation specific or run\_time data or caching here                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
  | `fallback`            | <ApiLink name="lv_font_t" display="const lv_font_t *" />                                              | Fallback font for missing glyph. Resolved recursively                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
  | `user_data`           | `void *`                                                                                              | Custom user data for font.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | `get_glyph_dsc`       | `bool(*)(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next)` | Get a glyph's descriptor from a font.<br /><br />Fills `dsc_out` with metrics for the glyph corresponding to `letter` in `font`. `letter_next` is provided for kerning. The implementation may adjust `dsc_out->adv_w` based on the following character. Pass 0 if there is no next character.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | `get_glyph_bitmap`    | `const void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf)`                                | Get glyph draw data from a font.<br /><br />Returns an opaque pointer to draw data for the glyph described by `g_dsc`. The concrete type and interpretation of the returned pointer depend on `g_dsc->format` (and related flags, e.g. whether a raw bitmap was requested).<br /><br />For legacy bitmap formats (e.g. A1/A2/A3/A4/A8), the implementation may either:<br />- decode/decompress into the caller-provided `draw_buf` and return a pointer to that draw buffer (typically an `lv_draw_buf_t *`), or<br />- return a pointer to font-internal bitmap storage.<br /><br />For non-bitmap formats (e.g. `LV_FONT_GLYPH_FORMAT_IMAGE`, vector/outline/SVG, or custom formats), the implementation typically ignores `draw_buf` and returns a format-specific object (such as an image source or `lv_vector_path_t *`).<br /><br />The caller must always treat the return value as the authoritative glyph draw data and interpret it according to `g_dsc->format`. Do not assume the data was written into `draw_buf` or that it is always an alpha bitmap. The returned pointer is only valid until `release_glyph` is called. |
  | `release_glyph`       | `void(*)(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc)`                                          | Release a glyph and any resources acquired during `get_glyph_dsc` or `get_glyph_bitmap`.<br /><br />Must be called after the glyph bitmap is no longer needed. Releases any internal cache entry stored in `g_dsc->entry` by the font implementation. Calling this with a `g_dsc` whose `entry` is NULL must be treated as a no-op.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
  | `line_height`         | <ApiLink name="int32_t" />                                                                            | The real line height where any text fits                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | `base_line`           | <ApiLink name="int32_t" />                                                                            | Base line measured from the bottom of the line\_height                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | `cap_height`          | <ApiLink name="int32_t" />                                                                            | Cap height of the font                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | `x_height`            | <ApiLink name="int32_t" />                                                                            | x-height of the font                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
  | `subpx`               | <ApiLink name="uint8_t" />                                                                            | An element of `lv_font_subpx_t`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
  | `kerning`             | <ApiLink name="uint8_t" />                                                                            | An element of `lv_font_kerning_t`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
  | `static_bitmap`       | <ApiLink name="uint8_t" />                                                                            | The font will be used as static bitmap                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | `underline_position`  | <ApiLink name="int8_t" />                                                                             | Distance between the top of the underline and base line (\< 0 means below the base line)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | `underline_thickness` | <ApiLink name="int8_t" />                                                                             | Thickness of the underline                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
</ApiMember>

<ApiMember kind="struct" name="_lv_font_class_t">
  \_lv_font_class_t [#_lv_font_class_t]

  | Member        | Type                                                          | Description                               |
  | ------------- | ------------------------------------------------------------- | ----------------------------------------- |
  | `create_cb`   | `lv_font_t *(*)(const lv_font_info_t *info, const void *src)` | Font creation callback function           |
  | `delete_cb`   | `void(*)(lv_font_t *font)`                                    | Font deletion callback function           |
  | `dup_src_cb`  | `void *(*)(const void *src)`                                  | Font source duplication callback function |
  | `free_src_cb` | `void(*)(void *src)`                                          | Font source free callback function        |
</ApiMember>

<ApiMember kind="struct" name="_lv_font_info_t">
  \_lv_font_info_t [#_lv_font_info_t]

  | Member        | Type                                                                 | Description                                               |
  | ------------- | -------------------------------------------------------------------- | --------------------------------------------------------- |
  | `name`        | `const char *`                                                       | Font name, used to distinguish different font resources   |
  | `class_p`     | <ApiLink name="lv_font_class_t" display="const lv_font_class_t *" /> | Font backend implementation                               |
  | `size`        | <ApiLink name="uint32_t" />                                          | Font size in pixel                                        |
  | `render_mode` | <ApiLink name="uint32_t" />                                          | Font rendering mode, see `lv_freetype_font_render_mode_t` |
  | `style`       | <ApiLink name="uint32_t" />                                          | Font style, see `lv_freetype_font_style_t`                |
  | `kerning`     | <ApiLink name="lv_font_kerning_t" />                                 | Font kerning, see `lv_font_kerning_t`                     |
</ApiMember>

Macros [#macros]

<ApiMember kind="macro" name="LV_FONT_DECLARE" file="font/lv_font.h" line="278" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L278">
  LV_FONT_DECLARE [#lv_font_declare]

  ```c title=" " lineNumbers=1
  #define LV_FONT_DECLARE(font_name) \
      LV_ATTRIBUTE_EXTERN_DATA extern const lv_font_t font_name;
  ```
</ApiMember>

Variables [#variables]

<ApiMember kind="variable" name="lv_font_montserrat_14" file="font/lv_font.h" line="293" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/font/lv_font.h#L293">
  lv_font_montserrat_14 [#lv_font_montserrat_14]

  ```c title=" " lineNumbers=1
  const lv_font_t lv_font_montserrat_14
  ```
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_types.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_area.h&#x22;]" includedBy="[&#x22;lv_vg_lite_bitmap_font_cache.h&#x22;, &#x22;lv_font_fmt_txt.h&#x22;, &#x22;lv_font_manager.h&#x22;, &#x22;lv_imgfont.h&#x22;, &#x22;lv_font_private.h&#x22;, &#x22;lv_freetype_private.h&#x22;, &#x22;lv_style.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_label.h&#x22;]" transitiveIncludes="[&#x22;lv_assert.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_kconfig.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;]" />
