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:
- 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.
- Moving custom fonts including C sources to a project’s private
libfolder is the right solution and it works out of the box. I created a folder namedlvgl-fontswith custom fonts that use#include <lvgl.h>and put it in theproject/libfolder. Next, I addedlvgl-fontsto thelib_depsin theplatformio.ini:
[env:myenv]
lib_deps =
lvgl/lvgl@^8.3.4
lvgl-fonts
It works for me. Could you try the 2nd approach?