mikroSDK Reference Manual
lv_freetype.h
Go to the documentation of this file.
1
5#ifndef LV_FREETYPE_H
6#define LV_FREETYPE_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12/*********************
13 * INCLUDES
14 *********************/
15#include "../../../lvgl.h"
16#if LV_USE_FREETYPE
17
18/*********************
19 * DEFINES
20 *********************/
21
22/**********************
23 * TYPEDEFS
24 **********************/
25typedef enum {
26 FT_FONT_STYLE_NORMAL = 0,
27 FT_FONT_STYLE_ITALIC = 1 << 0,
28 FT_FONT_STYLE_BOLD = 1 << 1
29} LV_FT_FONT_STYLE;
30
31typedef struct {
32 const char * name; /* The name of the font file */
33 const void * mem; /* The pointer of the font file */
34 size_t mem_size; /* The size of the memory */
35 lv_font_t * font; /* point to lvgl font */
36 uint16_t weight; /* font size */
37 uint16_t style; /* font style */
38} lv_ft_info_t;
39
40/**********************
41 * GLOBAL PROTOTYPES
42 **********************/
43
52bool lv_freetype_init(uint16_t max_faces, uint16_t max_sizes, uint32_t max_bytes);
53
57void lv_freetype_destroy(void);
58
65bool lv_ft_font_init(lv_ft_info_t * info);
66
71void lv_ft_font_destroy(lv_font_t * font);
72
73/**********************
74 * MACROS
75 **********************/
76
77#endif /*LV_USE_FREETYPE*/
78
79#ifdef __cplusplus
80} /* extern "C" */
81#endif
82
83#endif /* LV_FREETYPE_H */
Definition lv_font.h:64