Error: 'lv_font_montserrat_20 when trying to set a bigger font


I am getting this error: error: 'lv_font_montserrat_20' was not declared in this scope when trying to set a bigger font

What MCU/Processor/Board and compiler are you using?

nRF52 and ST7789

What LVGL version are you using?


What do you want to achieve?

Make text bigger in the label

What have you tried so far?

Tried the code below.

Code to reproduce

  //Change the active screen's background color
  //lv_obj_set_style_bg_color(lv_scr_act(), lv_color_hex(0x003a57), LV_PART_MAIN);
  lv_obj_set_style_bg_color(lv_scr_act(), lv_color_black(), LV_PART_MAIN);

  //Create a white label, set its text and align it to the center
  lv_obj_t * label = lv_label_create(lv_scr_act());
  lv_label_set_text(label, "Hello world");
  lv_obj_set_style_text_color(lv_scr_act(), lv_color_white(), LV_PART_MAIN);
  lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);

Did you set #define LV_FONT_MONTSERRAT_20 1 in your lv_conf.h?

Thank you. That did it.