Description
What MCU/Processor/Board and compiler are you using?
ESP32-C6 Dev Board
What LVGL version are you using?
8.3.11 with esp_lvgl_port 1.4.0
What do you want to achieve?
i want to set the font size of a single label to “large!”
What have you tried so far?
I enabled the large font in the menuconfig, initialized a new style, applied the font and applied the style to the label. the label did not change.
Code to reproduce
void create_ui_components(lv_disp_t *disp)
{
<code ommitted...>
lv_style_t style;
lv_style_init(&style);
lv_style_set_text_font(&style, &lv_font_montserrat_48);
strcat(centerText, getOpModeString());
strcat(centerText, " - ");
strcat(centerText, getStatusString());
status_label = lv_label_create(scr);
lv_label_set_text(status_label, centerText);
lv_obj_add_style(status_label, &style, 0); // <= i would expect this to work...
lv_obj_align(status_label, LV_ALIGN_CENTER, 0, 0);
}
any ideas on what i’m doing wrong? it surely cannot be much…
thank you so much!