Font converter feature request

Hello!

Code space is sometimes a valuable asset in embedded devices. Due to this, one has to be careful in what characters to include in a font. Why store character ranges which are not required!

But then … Suddenly I need to add a language variant which indeed needs those accented characters, cyrillics or whatever which are NOT in the current font.

Now it would be very useful if I could easily find out the characters which already are in the font. This information could be shown for instance in the comment block at the start of the c-file. From there it would be simple to copy and paste to the online converter’s “range” and/or “symbols” field(s), and then modify / add characters as required.

What do you think?

Cheers,
-petri h

I believe this information is already made available: https://github.com/littlevgl/lvgl/blob/3abd90740498e1d2b5383124f595d318e4255857/src/lv_font/lv_font_roboto_12.c#L6

We could potentially add a new comment with the same information that’s easier for a human to work with, instead of one long options string.

1 Like

Yes, I had a look at the font c-files - indeed, almost all of them has this info. Rather easy to take from there should there be a need to add chararacters etc …

It would be quite useful if the online converter would include similar “opts” information at it’s output too. Now there reads “Opts:” at the header block but (at least on the fonts I have converted), there is no information after it. It is like this:

#include "lvgl/lvgl.h"

    /*******************************************************************************
     * Size: 20 px
     * Bpp: 4
     * Opts: 
     ******************************************************************************/

Thanks!

This is because the online interface feeds the options into the converter in a different manner. I’ll see if I can get it to generate a partial options string as well.

1 Like

Great! Thanks again! :star_struck: