Working in keil IDE on stm32H7 mcu
lvgl v 7.10
and cant change font.
in conf.h ive set #define LV_FONT_MONTSERRAT_26 1
global:
extern lv_font_t lv_font_montserrat_26;
static lv_style_t label_style;
static lv_style_t* labelstyle_pointer=&label_style;
style init code :
void init_label_style(void)
{
lv_style_init(labelstyle_pointer);
lv_style_set_text_font(labelstyle_pointer,LV_STATE_DEFAULT,&lv_font_montserrat_26);
}
label init code:
lv_obj_t* sample_label= lv_label_create(lv_scr_act(), NULL);
// lv_obj_align(sample_label, NULL, LV_ALIGN_IN_TOP_MID, -50, 0);
lv_label_set_align(sample_label, LV_LABEL_ALIGN_CENTER);
lv_label_set_text(sample_label, “sometext”);
lv_obj_add_style( sample_label, LV_OBJ_PART_MAIN,labelstyle_pointer);`
so compiler tells me that there are no problems at all (definition seems fine)
but default font seems used.
i still didnt understand if i should declare lv_style_t object in globals or not. (For example for simple lv objects i need only pointer variable)
so can someone tell me what i am douing wrong?
Also compiler is not makefile that comes with library. standard keil arm compiler is in use.