font68=lvgl.font_load(spi.SPI_1,68,2,190) 5. 字体使用: localxiaoguoLabel=lvgl.label_create(itemCont,nil) lvgl.obj_set_style_local_text_font(xiaoguoLabel, lvgl.LABEL_PART_MAIN, lvgl.STATE_DEFAULT, font68) lvgl.label_set_text(xiaoguoLabel,"测试@TEST")lvgl.obj_align(xiaoguoLabel,mode...
Being able to load a font from a buffer object would be a great idea if it allows loading the font without needing to use the fsdriver. For the Python binding it would be a lot easier to open the file and dump the contents of the file into a single function call. 👍 2 Contribut...
lcd.invoff()--这个屏可能需要反显log.info("lvgl", lvgl.init()) scr = lvgl.obj_create(nil,nil)localfont_16 = lvgl.font_load("/luadb/16_test_fonts.bin")assert(font_16,"font not found")--这行注释掉就不崩了lvgl.obj_set_style_local_text_font(scr, lvgl.LABEL_PART_MAIN, lvgl.STATE...
(lv.ALIGN.LEFT_MID, 5, 0) font_simsun_16_cjk = lv.font_load("S:../../assets/font/lv_font_simsun_16_cjk.fnt") cz_label = lv.label(lv.screen_active()) cz_label.set_style_text_font(font_simsun_16_cjk, 0) cz_label.set_text("嵌入式系统(Embedded System),\n是一种嵌入机械或...
lv_font_load_bitmap("font.bmp", &font); // 获取字符信息 lv_font_get_info(font, &lv_font_info); // 计算字符宽度 int char_width = lv_font_info.height; printf("字符宽度:%d ", char_width); } void task(void *arg) { // 绘制字符串 lv_disp_draw_string(disp, (lv_coord_t)10,...
Serial.println("font load failed"); } 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(lv_scr_act()); lv_obj_align(label_zh, LV_ALIGN_BOTTOM_MID, 0, 0); ...
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts ...
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~24...
font_load("S:../../assets/font/lv_font_simsun_16_cjk.fnt") cz_label = lv.label(lv.screen_active()) cz_label.set_style_text_font(font_simsun_16_cjk, 0) cz_label.set_text("嵌入式系统(Embedded System),\n是一种嵌入机械或电气系统内部、具有专一功能和实时计算性能的计算机系统。") cz...
needs ~3256 bytes in FLASH, only characters 1234567890:-.#define LOAD_GFXFF// FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts#define SMOOTH_FONT#define SPI_FREQUENCY 27000000#define SPI_READ_FREQUENCY 20000000#define SPI_TOUCH_FREQUENCY 2500000...