To enable cache, setLV_USE_FT_CACHE_MANAGER 1in lv_freetype.h. /*Init freetype library*Cache max 64 faces and 1 size*/lv_freetype_init(64,1,0);/*Create a font*/staticlv_ft_info_tinfo;info.name="./lv_lib_freetype/arial.ttf";info.weight=16;info.style=FT_FONT_STYLE_NORMAL;lv...
LVGL学习之路——基于lv_lib_freetype库的TTF字体⽂件动态加载中⽂字体(。 。。 前⾔ 在学习lvgl中,在英⽂字体上很多⼈都⽤过,但是中⽂字体往往需要靠取模去实现。那么我就在想,如何像windows那样加载动态的字体呢,这样想做多⼤字体都⾏。于是就开始了字体的移植。
lvgl / lv_lib_freetype Public Notifications Fork 19 Star 55 Code Issues 2 Pull requests Actions Projects Security Insights ActivityAll branchesAll activity All usersAll time Showing most recent first No activity matched your search. Try expanding your search by selecting a different ...
lv_font_fmt_freetype_dsc_t * dsc = (lv_font_fmt_freetype_dsc_t *)(font->user_data); face = dsc->face; FTC_ImageTypeRec desc_sbit_type; desc_sbit_type.face_id = (FTC_FaceID)face; desc_sbit_type.flags = FT_LOAD_RENDER | FT_LOAD_TARGET_NORMAL; ...
bool lv_freetype_init(uint16_t max_faces, uint16_t max_sizes, uint32_t max_bytes) { FT_Error error = FT_Init_FreeType(&library); if(error) { LV_LOG_ERROR("init freeType error(%d)", error); return false; } #if LV_USE_FT_CACHE_MANAGER ...
/*Init freetype library *Cache max 64 faces and 1 size*/ lv_freetype_init(64, 1, 0); /*Create a font*/ static lv_ft_info_t info; info.name = "./lv_lib_freetype/arial.ttf"; info.weight = 16; info.style = FT_FONT_STYLE_NORMAL; lv_ft_font_init(&info); /*Create style ...