How to load binary fonts?



I used the lv_font_conv tool to generate the bin file and the lv_font_load function to load the file but the text could not be displayed. However, it was OK to generate a C array.

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

STM32F429 keil

What LVGL version are you using?


What do you want to achieve?

Load an external binary font library for text display

What have you tried so far? (5.3 KB)

I found this binary when I was debugging and could see their gdsc->adv_w; gdsc->box_h; gdsc->box_w; gdsc->ofs_x; gdsc->ofs_y;.bpp.
The C array generated by the same tool with the same TTF file is displayable.

Code to reproduce

static void lvgl_font_test2(void)
lv_font_t * my_font;
my_font = lv_font_load(“0:/FONT/myfont100.bin”);

static lv_style_t font_style;
lv_style_set_text_font(&font_style, my_font);
lv_obj_t* label2 = lv_label_create(lv_scr_act());
lv_obj_add_style(label2, &font_style, 0);
lv_label_set_text(label2, "Rppido");
lv_obj_align(label2, LV_ALIGN_CENTER, 0, 0);


Screenshot and/or video

If possible, add screenshots and/or videos about the current state.