Add the Online TTF to Bin Array Unicode Font Converter

I am using Oneline TTF to C Array Unicode Font Converter,I find it’s very useful.
But the C file need to store in the RAM,They will take up a lot of space in RAM,
only the Bin array file can be stored in external storage space,So I need the TTF to Bin Array

They are const so they should be in ROM/flash.

You can use the offline version of the tool to create binary output.
But note that LVGL supports only the C array format now.

Thank you very much I will try it.

Hi I’m very very thank you,I successfully generated the binary font file with your method.
But I come across another question which is I don’t know how to use the binary font file in lvgl.
I use the visual studio 2017 and PC display as my monitor.

As I mentioned above LVGL doesn’t support the binary format now.

My project need to ues so many types font but i don’t have enought ram and rom how can i deel this question? It makes me very sad.

You can manually copy the place the gylph_bitmap section to the external flash ans change the get_glyph_bitmap to a custom one which read the bitmap from flash.
Take a look at lv_font_get_bitmap_fmt_txt as a reference.

1 Like

Does the offline font convert tools use the unicode ? Can it produce the C file?

The offline converter should be identical to the online one in terms of functionality. To produce a C file you should change the --format bin option to --format lvgl.

Thank you very much I successfully create the C file font with offline convert tool and it can be show.
But I find my online font convert really can’t work,When I click the “Converts” button the website reflesh and converts noting.

From your prior posts, it sounds like your network connection blocks some components of it from downloading. I’m not sure if we can do much about that.

Thank you very much,Three months ago,LVGL havn’t updated,the official website and many things use the old version.At that time I can use the online font convert website to convert the C file, the C file can still include many font,but now the online font websits can not be used,I don’t know what happening.
I don’t mean that reproach who,I just want to leak some news may it is important.

I think it’s because the new font converter depends on more libraries to be downloaded to the browser, whereas the old one was mostly a thin wrapper around the LVGL server itself.

Thank you very much I’ll try something else.