Error of font on porting lvgl to linux framebuffer

I did the setup of lvgl and call lv_demo_music()


	/* lvgl display buffer */
	static lv_disp_buf_t disp_buf;
	/* Declare a buffer for 1/10 screen size */
	static lv_color_t buf[LV_HOR_RES_MAX * LV_VER_RES_MAX /10];
	/* Initialize the display buffer */
	lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * LV_VER_RES_MAX /10);
	lv_disp_drv_t disp_drv;
	disp_drv.flush_cb = my_disp_flush;
	disp_drv.buffer = &disp_buf;

	lv_indev_drv_t indev_drv;

	indev_drv.type = LV_INDEV_TYPE_POINTER;
	indev_drv.read_cb = my_touchpad_read;

	/* APP */
	while(1) {

All of the source file has been successfully compile except lv_demo_music_main.c

Here the one of error that compiler thrown out, other error same as this

lv_examples/src/lv_demo_music/lv_demo_music_main.c: In function ‘_lv_demo_music_main_create’:
lv_examples/src/lv_demo_music/lv_demo_music_main.c:96:19: error: ‘lv_font_montserrat_12’ undeclared (first use in this function); did you mean ‘lv_font_montserrat_14’?
     font_small = &lv_font_montserrat_12;

The question is ,whichever demo i called,the compiler will throw out the same error

What should i do, i dont konw a way to resolve this.Thanks

Lately I successfully compiled lv_demo_widgets, it runs good but some mistake with color, such as gray to dark yellow, sky blue to red, unfortunately as now i didn’t know what cause it.

Im thinking about is these options caused lv_demo_music compile failed?

#define LV_FONT_MONTSERRAT_8     0
#define LV_FONT_MONTSERRAT_10    0
#define LV_FONT_MONTSERRAT_12    0
#define LV_FONT_MONTSERRAT_14    1
#define LV_FONT_MONTSERRAT_16    0
#define LV_FONT_MONTSERRAT_18    0
#define LV_FONT_MONTSERRAT_20    0
#define LV_FONT_MONTSERRAT_22    0
#define LV_FONT_MONTSERRAT_24    0
#define LV_FONT_MONTSERRAT_26    0
#define LV_FONT_MONTSERRAT_28    0
#define LV_FONT_MONTSERRAT_30    0
#define LV_FONT_MONTSERRAT_32    0
#define LV_FONT_MONTSERRAT_34    0
#define LV_FONT_MONTSERRAT_36    0
#define LV_FONT_MONTSERRAT_38    0
#define LV_FONT_MONTSERRAT_40    0
#define LV_FONT_MONTSERRAT_42    0
#define LV_FONT_MONTSERRAT_44    0
#define LV_FONT_MONTSERRAT_46    0
#define LV_FONT_MONTSERRAT_48    0

I change the value of marco try to if could enabled it
And the lv_demo_printer could be compile, seems when you want to use the lv_font , you should toggle of these marcos to enable it.

Solution Here

if you have same error with me

  1. check the lv_conf.h and jump to here

/* The built-in fonts contains the ASCII range and some Symbols with  4 bit-per-pixel.
 * The symbols are available via `LV_SYMBOL_...` defines
 * More info about fonts:
 * To create a new font go to:

/* Montserrat fonts with bpp = 4
 *  */
  1. change the value of marco from 0 to 1 could enable the font