Description
If you setup a theme (material for example) and initialize it with a custom big font, and create a button, and then a label, if the label has the button as parent, the label is correctly formated with the theme font, but if the label has lv_scr_act() as parent, it’s not correctly formated with theme default font.
What MCU/Processor/Board and compiler are you using?
Simulator
What do you want to achieve?
format labels with theme font
What have you tried so far?
Code to reproduce
lv_theme_t * th = lv_theme_material_init(200, &opensans60); //<<< my own font
lv_theme_set_current(th);
lv_obj_t * btn1 = lv_btn_create(lv_scr_act(), NULL);
lv_obj_set_pos(btn1, 10, 10);
/*Add text*/
lv_obj_t * label2 = lv_label_create(btn1, NULL); /*Put on 'btn1'*/
lv_label_set_text(label2, "Click me"); /*label is formated with opensans60 font*/
lv_obj_t * label2 = lv_label_create(lv_scr_act(), NULL); /*Put on main screen*/
lv_label_set_text(label2, "Click me"); /*label is NOT formated with opensans60 font*/