Include external fonts for the LVGL library

Hi David,

Sorry for the delay. I’ve finally experimented with LVGL + external fonts located outside the project source directory. See below what I learned:

  1. PlatformIO allows adding external C/C++ files located outside the project’s source folder to the build process. See more details at Build external sources — PlatformIO latest documentation. However, this approach will not work for your case because the custom LVGL fonts depend on the LVGL library.
  2. Moving custom fonts including C sources to a project’s private lib folder is the right solution and it works out of the box. I created a folder named lvgl-fonts with custom fonts that use #include <lvgl.h> and put it in the project/lib folder. Next, I added lvgl-fonts to the lib_deps in the platformio.ini:
[env:myenv]
lib_deps =
  lvgl/lvgl@^8.3.4
  lvgl-fonts

It works for me. Could you try the 2nd approach?