bin type font usage

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

bin type font usage

跳至解决方案
2,051 次查看
frozen
Contributor III

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");

0 项奖励
回复
1 解答
1,968 次查看
frozen
Contributor III

thanks @WenbinYuan ,

I preferred to add the function only to lv_font_loader.c file. Then I could use font from bin file.

在原帖中查看解决方案

2 回复数
1,983 次查看
WenbinYuan
NXP Employee
NXP Employee

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

0 项奖励
回复
1,969 次查看
frozen
Contributor III

thanks @WenbinYuan ,

I preferred to add the function only to lv_font_loader.c file. Then I could use font from bin file.