I want to implement a custom font NotoSand Arabic to my code
What MCU/Processor/Board and compiler are you using?
What LVGL version are you using?
What have you tried so far?
I tried to generate the font using the font converter with 1 bpp and range 0x600-0x6FF 32px with the name Noto, after that I added a new .c file with the name Noto.c and copied the generated code to it.
Then modified lv_conf.h custome font with this code
#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(Noto)
finally in my code:
LV_FONT_DECLARE(Noto); static lv_style_t title; lv_style_init(&title); lv_style_set_text_font(&title, &Noto); lv_style_set_text_color(&title, lv_palette_main(LV_PALETTE_BLUE));
label = lv_label_create(con, NULL); lv_label_set_text(label, "أختبار"); lv_obj_set_pos(label,0,100); lv_obj_add_style(label,&title,LV_STATE_DEFAULT);
It not working for some reason and the word I wrote is not being displayed on the screen, when I remove the lv_obj_add_style() it comes back, what action am I missing?