1 /** 2 * @file lv_imgfont.h 3 * 4 */ 5 6 #ifndef LV_IMGFONT_H 7 #define LV_IMGFONT_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include "../../lv_conf_internal.h" 17 #include "../../font/lv_font.h" 18 19 #if LV_USE_IMGFONT 20 21 /********************* 22 * DEFINES 23 *********************/ 24 25 /********************** 26 * TYPEDEFS 27 **********************/ 28 29 /* gets the image path name of this character */ 30 typedef const void * (*lv_imgfont_get_path_cb_t)(const lv_font_t * font, 31 uint32_t unicode, uint32_t unicode_next, 32 int32_t * offset_y, void * user_data); 33 34 /********************** 35 * GLOBAL PROTOTYPES 36 **********************/ 37 38 /** 39 * Creates a image font with info parameter specified. 40 * @param height font size 41 * @param path_cb a function to get the image path name of character. 42 * @param user_data pointer to user data 43 * @return pointer to the new imgfont or NULL if create error. 44 */ 45 lv_font_t * lv_imgfont_create(uint16_t height, lv_imgfont_get_path_cb_t path_cb, void * user_data); 46 47 /** 48 * Destroy a image font that has been created. 49 * @param font pointer to image font handle. 50 */ 51 void lv_imgfont_destroy(lv_font_t * font); 52 53 /********************** 54 * MACROS 55 **********************/ 56 57 #endif /*LV_USE_IMGFONT*/ 58 59 #ifdef __cplusplus 60 } /*extern "C"*/ 61 #endif 62 63 #endif /* LV_IMGFONT_H */ 64