Additional fonts and platformio

Description

What MCU/Processor/Board and compiler are you using?

We’re using an ESP32

What LVGL version are you using?

V7.1.0

What do you want to achieve?

We work with VSCode and Platformio which has an awesome Github connection. We would like to be able to clone the repro and compile. The only thing that’s not working is that additional fonts can’t seem to be found if they’re in an /fonts folder.

What have you tried so far?

Right now we have to copy and paste the fonts to the /lipdeps/environment/lvgl/src/lv_font folder and then it compiles.

We’ve also tried to include the fonts folder in the platformio.ini file like this:

lvgl_build_flags = 
    -I fonts
    -I include
    -D LV_CONF_INCLUDE_SIMPLE

the -I include is pointing to our custom lv_conf.h file and that works fine thanks to the LV_CONF_INCLUDE_SIMPLE flag. But that doesn’t seem to work for extra font files…

I also created a topic on the platformio forums, maybe there’s a simple buildflag to solve it.

I’ve just replied in platformio’s forum.

I’ll add the solution here as well. I copied our custom fonts to the lvgl source using a python script.

Find the details here.