Online Font Converter
Convert TTF and WOFF fonts to C array.
With this free online font converter tool you can create C array from any TTF or WOFF. You can select ranges of Unicode characters and speficy the bpp (bit-per-pixel).
The font converter is designed to be compatible with LVGL.
How to use the font converter?
- Give name to the output font. E.g. "arial_40"
- Specify the height in px
- Set the bpp (bit-per-piel). Higher value results smoother (anti-aliased) font
- Choose a TTF or WOFF font
- Set a range of Unicode character to include in your font or list the characters in the Symbols field
- Optionally choose and other font too and specify the ranges and/or symbols for it as well. The characters will be merged into the final C file.
- Click the Convert button to download the result C file.
How to use the generated fonts in LVGL?
- Copy the result C file into your LVGL project
- In a C file of your application declare the font as:
extern lv_font_t my_font_name;
or simplyLV_FONT_DECLARE(my_font_name);
- Set the font in a style:
style.text.font = &my_font_name;
Useful notes
- Unicode table to pick letters: https://unicode-table.com/
- Unicode ranges http://jrgraphix.net/research/unicode.php
- A pixel perefect fonts: Terminus.
- List of built-in symbols Use this FontAwesome symbol font and copy this list to Range:
61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,
61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,
61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,
61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,
61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,
62020,62087,62099,62212,62189,62810,63426,63650 - To learn more about the font handling of LVGL read this Guide
- To use the Fonts without LVGL you need lv_font.c/h, lv_font_fmt_txt.c/h from here.
The Offline version of the converter is available on GitHub.
Subscribe to Newsletters
Subscribe to our newsletter to not miss any news about LVGL.
We will send maximum of 2 mails per month.
Contact us
Do you have a question? Have a great idea? Want to leave feedback?
We are looking forward to hearing from you. Just fill in the form to contact us.