I’m trying to set a larger font for the label in the bottom of my gauge.
I never changed the font, but I thought it would not me too difficult. But I was wrong!
I’m using an ESP32 WROVER with ILI9341 and lvgl V7.
First I tried setting it in the style of the gauge, but there the lv.font was no attribute of the module.
Then I tried to do it locally, in different ways:
By default in lv_micropython, only font_montserrat_14 and font_montserrat_16 built-in fonts are enabled. The rest of them are disabled, to save memory.
It’s very easy to enable other fonts - just edit lv_conf.h, set LV_FONT_MONTSERRAT_XX to 1 and re-build lv_micropython.
Thank you! This was literally the only thing I missed. After changing from 20 to 16, everything worked as expected.
I have read the LVGL docs for 99%, but sometimes I am not fully aware what the differences are with the ‘smaller lvgl’ we use. Therefore I read about the builtin fonts (from 12px to 48px) and just assumed that they were all available in lv_micropython as well. Now that I realized this, I checked it, rebuilt lv_micropython with the extra fonts and everything works as expected.