my GUI uses custom fonts exclusively, so all montserrat fonts are disabled. In my lv_conf.h I select my custom default font in this way:
#define LV_FONT_CUSTOM_DECLARE \
LV_FONT_DECLARE(font_geist_medium_20)
/** Always set a default font */
#define LV_FONT_DEFAULT &font_geist_medium_20
So far so good, no problems there.
Now I want to replicate this environment by using idf.py menuconfig but I did not find any way to do that, apart from setting CONFIG_LV_CONF_SKIP=n and using a custom lv_conf.h. I did not try that because it seems to me a clear declaration of defeat.
Hi these work arounds are no longer required. So the whole issue is that it’s impossible to declare raw C expression in kconfig, it requires a header file or via some compiler definitions
Starting in v9.6 the following pattern was introduced:
that is you can directly define in your .config file:
LV_SYSMON_USE_CUSTOM_INCLUDE=y
LV_SYSMON_CUSTOM_INCLUDE=“path/to/something.h”
LVGL then includes path/to/something.h for you so you can define LV_SYSMON_GET_IDLE in that file and it will be picked up
The same pattern exists for all modules where the user can pass a custom C expression, font is also one of them
After that I would need to add font_geist_medium_20.c (or whatever C file defines that font) to the linking process in some way.
That sounds reasonable to me, although I would rename LV_SYSMON_USE_CUSTOM_INCLUDE and friends to LV_USE_CUSTOM_INCLUDE as the current name is quite misleading.