VSF Documented
vsf_tgui_sv_font.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_TINY_GUI_V_FONT_H__
19#define __VSF_TINY_GUI_V_FONT_H__
20
21/*============================ INCLUDES ======================================*/
22#include "../../vsf_tgui_cfg.h"
23
24#if VSF_USE_TINY_GUI == ENABLED
25
26/*============================ MACROS ========================================*/
27#ifndef VSF_TGUI_CFG_SV_FONTS
28# define VSF_TGUI_CFG_SV_FONTS ENABLED
29#endif
30
31#ifndef VSF_TGUI_CFG_SUPPORT_FONT_USE_FREETYPE
32# define VSF_TGUI_CFG_SUPPORT_FONT_USE_FREETYPE ENABLED
33#endif
34
35#define __TGUI_SV_FONT_DEF(__NAME, __HEIGHT) __NAME
36#define TGUI_SV_FONT_DEF(__NAME, __HEIGHT) \
37 __TGUI_SV_FONT_DEF(__NAME, __HEIGHT)
38
39#define TGUI_SV_FT2_FONT_DEF(__NAME, __PATH, __SIZE) \
40 __TGUI_SV_FONT_DEF(__NAME, 0)
41
42/*============================ MACROFIED FUNCTIONS ===========================*/
43/*============================ TYPES =========================================*/
46
47#if VSF_TGUI_CFG_SUPPORT_NAME_STRING == ENABLED
48 const char* name_ptr;
49#endif
50
51#if VSF_TGUI_CFG_SUPPORT_FONT_USE_FREETYPE == ENABLED
52 struct {
54 const char* font_path_ptr;
55 void *data_ptr;
56 };
57#endif
58};
60
61#if VSF_TGUI_CFG_SV_FONTS == ENABLED
62enum {
64};
65#endif
66/*============================ GLOBAL VARIABLES ==============================*/
67/*============================ PROTOTYPES ====================================*/
68extern
70
71extern
73
74extern
76
77extern
79
80#endif
81
82#endif
83/* EOF */
unsigned uint32_t
Definition stdint.h:9
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_tgui_sv_font.h:44
uint8_t font_size
Definition vsf_tgui_sv_font.h:53
uint8_t height
Definition vsf_tgui_sv_font.h:45
const char * name_ptr
Definition vsf_tgui_sv_font.h:48
void * data_ptr
Definition vsf_tgui_sv_font.h:55
const char * font_path_ptr
Definition vsf_tgui_sv_font.h:54
uint8_t vsf_tgui_font_get_char_width(const uint8_t font_index, uint32_t char_u32)
@ VSF_TGUI_SV_FONTS
Definition vsf_tgui_sv_font.h:63
uint8_t vsf_tgui_font_number(void)
Definition vsf_tgui_sv_font.c:75
const vsf_tgui_font_t * vsf_tgui_font_get(uint8_t font_index)
Definition vsf_tgui_sv_font.c:69
uint8_t vsf_tgui_font_get_char_height(const uint8_t font_index)