I want to change the font of the button’s text for lv_btnmatrix.
You can create a style and apply it to the LV_BTNMATRIX_PART_BTN
part of your button matrix:
static lv_style_t style_buttons;
lv_style_init(&style_buttons);
lv_style_set_text_font(&style_buttons, LV_STATE_DEFAULT, &lv_font_montserrat_20);
lv_style_set_text_color(&style_buttons, LV_STATE_DEFAULT, LV_COLOR_BLUE);
lv_obj_t * btnmatrix1 = lv_btnmatrix_create(lv_scr_act(), NULL);
//..
lv_obj_add_style(btnmatrix1, LV_BTNMATRIX_PART_BTN, &style_buttons);