bin type font usage

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
2,060件の閲覧回数
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,977件の閲覧回数
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,992件の閲覧回数
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,978件の閲覧回数
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.

An error has occurred when reading existing sub-variable "Language_PG_Configuration"; see cause exception! The type of the containing value was: extended_hash+string (lithium.coreapi.webui.template.models.NamedValueByNameTemplateModel wrapped into f.e.b.StringModel) ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign redirect_lingo_page_url = web... [in template "language_macro_header.ftl" at line 173, column 1] - Reached through: #include "language_macro_header.ftl" [in template "Language_translator_Dashboard" at line 3, column 1] ----