lv_lib_freetype
1.0.0
이 저장소는 LVGL 저장소로 병합됩니다. https://docs.lvgl.io/master/libs/freetype.html을 참조하십시오
Font Bitmaps 실행 시간을 생성하기 위해 Freetype의 인터페이스
makesudo make install /usr/include/freetype2 (gcc : -I/usr/include/freetype2 -L/usr/local/lib )freetype (gcc : -L/usr/local/lib -lfreetype 용) 캐시를 활성화하려면 lv_freetype.h에서 LV_USE_FT_CACHE_MANAGER 1 설정하십시오.
/*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 with the new font*/
static lv_style_t style ;
lv_style_init ( & style );
lv_style_set_text_font ( & style , info . font );
/*Create a label with the new style*/
lv_obj_t * label = lv_label_create ( lv_scr_act ());
lv_obj_add_style ( label , & style , 0 );
lv_label_set_text ( label , "Hello world" );