LVGL sample code to change font
Posted: Tue Mar 22, 2022 5:10 am
I'm hoping somebody can post a very simple example of how to change the font size in the ESP32 port of the LVGL library (LVGL V8).
Code: Select all
static lv_style_t style;
lv_style_init(&style);
lv_style_set_text_font(&style, &lv_font_montserrat_10); // <--- you have to enable other font sizes in menuconfig
lv_obj_add_style(obj, &style, 0); // <--- obj is the label