I use NXP Imx RT1170 series mcu and I want to use font as a bin format. How could that possible ?
I see there is a source file as lv_binfont_loader.c but this file is not in the latest tag, it exists in master branch. Why the tag does not include this file ? Is it still in progress ?
I have downloaded offline lvgl font converter and have got bin font file with script. After that I have written this bin file into flash's spesific address and used below functions but I could not see anything in screen. I am open any advice.
lv_font_t my_font;
lv_binfont_load(&my_font,"F:/font.bin");
static lv_style_t font_style;
lv_style_init(&font_style);
lv_style_set_text_font(&font_style, &my_font);
lv_obj_t *label_zh = lv_label_create(ui->screen);
lv_obj_align(label_zh, LV_ALIGN_BOTTOM_MID, 0, 0);
lv_obj_add_style(label_zh, &font_style, 0);
lv_label_set_text(label_zh, "china font");
Solved! Go to Solution.
thanks @WenbinYuan ,
I preferred to add the function only to lv_font_loader.c file. Then I could use font from bin file.
Hi @frozen,
The lv_binfont_loader.c exist in LVGL master branch means it's a new feature of V9.0 which is not released, and GUI Guider only support released version of LVGL (V1.6.1 with LVGL V8.3.5).
And this feature may need other support, check the PR 5333 to get more details if you want use this feature in V8.3.5.
Best Regards,
Wenbin
thanks @WenbinYuan ,
I preferred to add the function only to lv_font_loader.c file. Then I could use font from bin file.