Add an lv_font_load_from_buffer() function. We could use some function pointers likeread_cbwhich could point tolv_fs_reador abuf_readfunction. This way we don't need to add a bunch of duplication. cc@derekstavis kisvegabor mentioned thison Aug 12, 2023 ...
之后在luat_lib_lvgl_font.c中对lua暴露你的字库就可以了 /* 获取内置字体 @api lvgl.font_get(name) @string 字体名称+字号, 例如 opposans_m_10 simsun_48 @return userdata 字体指针 @usage local font = lvgl.font_get("simsun_48") */ int luat_lv_font_get(lua_State *L) { lv_font_t* ...
8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters#defineLOAD_GFXFF// FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts#defineSMOOTH_FONT#defineSPI_FREQUENCY 79000000#defineSPI_READ_FREQUENCY 20000000#defineSPI_TOUCH_FREQUENCY 2500000 另一...
lv_conf_t conf; lv_init(&conf); // 创建显示对象 disp = lv_disp_create(NULL, &conf); // 加载字体 lv_font_load_bitmap("font.bmp", &font); // 获取字符信息 lv_font_get_info(font, &lv_font_info); // 计算字符宽度 int char_width = lv_font_info.height; printf("字符宽度:%d ...
当你创建了一个像screen = lv.obj()这样的界面对象时,你可以用lv.scr_load(screen)激活它。 lv.scr_act()函数为当前活动的界面对象。 事件(Events)# 要为对象设置事件回调,请使用obj.add_event_cb(event_cb, lv.EVENT.type, user_data), 要手动向对象发送事件,请使用lv.event_send(obj, lv.EVENT.type...
error: unknown type name 'lv_scr_load_anim_t'; did you mean 'lv_screen_load_anim_t'?| 则是由于新的函数命名不同,可以按照后面的提示,改为 lv_screen_load_anim_t 即可(其他还有 lv_screen_load_anim 等也类似处理)。 还有一个报错是:undefined reference to `lv_mem_free',改为 lv_free 即可...
Introduce the problem From #5196 (comment) TinyTTF and lv_binfont_load I have changed the create API like this: lv_result_t lv_tiny_ttf_create_file(lv_font_t * font, const char * path, int32_t font_size); This way if a font is used in ma...
#define LV_FONT_MONTSERRAT_8 0 #define LV_FONT_MONTSERRAT_10 0 #define LV_FONT_MONTSERRAT_12 0 #define LV_FONT_MONTSERRAT_14 1 #define LV_FONT_MONTSERRAT_16 0 #define LV_FONT_MONTSERRAT_18 0 #define LV_FONT_MONTSERRAT_20 0 #define LV_FONT_MONTSERRAT_22 0 #define LV_FONT...
Middlewares/lvgl/src/misc、Middlewares/lvgl/src/widgets、Middlewares/LVGL/GUI_APP的10个组->添加.c文件:core、font、hal、misc、widgets同名,draw添加sw文件夹与其他.c,extra除了libs文件夹外都要添加,gpu添加draw-stm32_dma2d与draw-sdl,examples/porting添加porting文件夹中lv_port_disp_template和lv_port_...
#define LV_FONT_MONTSERRAT_8 0 #define LV_FONT_MONTSERRAT_10 0 #define LV_FONT_MONTSERRAT_12 0 #define LV_FONT_MONTSERRAT_14 1 #define LV_FONT_MONTSERRAT_16 0 #define LV_FONT_MONTSERRAT_18 0 #define LV_FONT_MONTSERRAT_20 0 #define LV_FONT_MONTSERRAT_22 0 #define LV_FONT...