With this free online font converter tool you can create C array from any TTF font. You can select a range of Unicode characters and speficy the bpp (bit-per-pixel).

The font converter is designed to be compitible with LittlevGL but with minor modification you can make it compatible with other graphics libraries.

How to use the font converter?

  1. Choose a TTF font
  2. Give name to the output font. E.g. "arial_40"
  3. Specify the height in px
  4. Set the bpp (bit-per-piel). Higher value results smoother (anti-aliased) font
  5. Set a range of Unicode character to include in your font
  6. Opitonally pick some character from the Range to include only them. Useful for Asian fonts where characters are "sparse"
  7. Use the Built-in option to include all bpp and add a #if USE_FONT_NAME
  8. Click the Convert button and result file will start to download.

How to use the generated fonts in LittlevGL?

  1. Copy the result C file into your LittlevGL project
  2. In a C file of your application declare the font as: extern lv_font_t my_font_name; or simply LV_FONT_DECLARE(my_font_name);
  3. Set the font in a style: style.text.font = &my_font_name;
You can use HTML Numbers too. E.g. ABC : ABC
Leave empty to pick all characters from the range
Convert as built-in font
All bpp will be included
The font can be enabled with "USE_FONT_NAME 1/2/4/8" (the number selects the bpp)

Useful notes

  • Unicode table to pick letters to the List: https://unicode-table.com/
  • Unicode ranges http://jrgraphix.net/research/unicode.php
  • 7 px hight pixel font Syncronizer: Download or visit its Website.
  • 8 px hight pixel font Unscii: Download (modifed) or visit its Website.
  • Symbol font FontAwesome: Download or visit its Website.
  • List of built-in symbols: (Range: 61440 .. 62190)
  • To learn more about the font handling of LittelvGL read this Guide
  • To use the Fonts without LittlevGL copy the required parts of lv_font.c and lv_font.h

LittlevGL - Open-source Embedded GUI Library

LittlevGL is a free and open-source graphics library providing everything you need to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint.

If you like LittlevGL, please
support its deveopment!

The founder of Littlev Graphics Library (LittlevGL) and related software modules is:
Gábor Kiss-Vámosi
All Rights Reserved ©  2018 Hungary