Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/libs/lvgl/lv_fonts/hekate_symbol_30.c
1476 views
1
/*
2
* Copyright (c) 2019 CTCaer
3
*
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms and conditions of the GNU General Public License,
6
* version 2, as published by the Free Software Foundation.
7
*
8
* This program is distributed in the hope it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
* more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
17
#include "../lv_misc/lv_font.h"
18
19
#include <memory_map.h>
20
21
#if USE_HEKATE_SYMBOL_30 != 0 /*Can be enabled in lv_conf.h*/
22
23
/***********************************************************************************
24
* hekate-symbols.ttf 30 px Font in U+f000 () .. U+f2ee () range with all bpp
25
* Sparse font with only these characters: 
26
***********************************************************************************/
27
28
/*Store the glyph descriptions*/
29
static const lv_font_glyph_dsc_t hekate_symbol_30_glyph_dsc[] =
30
{
31
#if USE_HEKATE_SYMBOL_30 == 4
32
{.w_px = 7, .glyph_index = 0}, /*Unicode: U+f001 ()*/
33
{.w_px = 25, .glyph_index = 120}, /*Unicode: U+f008 ()*/
34
{.w_px = 27, .glyph_index = 510}, /*Unicode: U+f00b ()*/
35
{.w_px = 31, .glyph_index = 930}, /*Unicode: U+f00c ()*/
36
{.w_px = 22, .glyph_index = 1410}, /*Unicode: U+f00d ()*/
37
{.w_px = 25, .glyph_index = 1740}, /*Unicode: U+f011 ()*/
38
{.w_px = 25, .glyph_index = 2130}, /*Unicode: U+f013 ()*/
39
{.w_px = 23, .glyph_index = 2520}, /*Unicode: U+f014 ()*/
40
{.w_px = 34, .glyph_index = 2880}, /*Unicode: U+f015 ()*/
41
{.w_px = 25, .glyph_index = 3390}, /*Unicode: U+f019 ()*/
42
{.w_px = 32, .glyph_index = 3780}, /*Unicode: U+f01c ()*/
43
{.w_px = 25, .glyph_index = 4260}, /*Unicode: U+f021 ()*/
44
{.w_px = 25, .glyph_index = 4650}, /*Unicode: U+f026 ()*/
45
{.w_px = 25, .glyph_index = 5040}, /*Unicode: U+f027 ()*/
46
{.w_px = 20, .glyph_index = 5430}, /*Unicode: U+f028 ()*/
47
{.w_px = 20, .glyph_index = 5730}, /*Unicode: U+f03e ()*/
48
{.w_px = 25, .glyph_index = 6030}, /*Unicode: U+f040 ()*/
49
{.w_px = 20, .glyph_index = 6420}, /*Unicode: U+f048 ()*/
50
{.w_px = 20, .glyph_index = 6720}, /*Unicode: U+f04b ()*/
51
{.w_px = 20, .glyph_index = 7020}, /*Unicode: U+f04c ()*/
52
{.w_px = 13, .glyph_index = 7320}, /*Unicode: U+f04d ()*/
53
{.w_px = 32, .glyph_index = 7530}, /*Unicode: U+f051 ()*/
54
{.w_px = 30, .glyph_index = 8010}, /*Unicode: U+f052 ()*/
55
{.w_px = 16, .glyph_index = 8460}, /*Unicode: U+f053 ()*/
56
{.w_px = 16, .glyph_index = 8700}, /*Unicode: U+f054 ()*/
57
{.w_px = 25, .glyph_index = 8940}, /*Unicode: U+f067 ()*/
58
{.w_px = 25, .glyph_index = 9330}, /*Unicode: U+f068 ()*/
59
{.w_px = 27, .glyph_index = 9720}, /*Unicode: U+f071 ()*/
60
{.w_px = 29, .glyph_index = 10140}, /*Unicode: U+f074 ()*/
61
{.w_px = 26, .glyph_index = 10590}, /*Unicode: U+f077 ()*/
62
{.w_px = 26, .glyph_index = 10980}, /*Unicode: U+f078 ()*/
63
{.w_px = 25, .glyph_index = 11370}, /*Unicode: U+f079 ()*/
64
{.w_px = 29, .glyph_index = 11760}, /*Unicode: U+f07b ()*/
65
{.w_px = 25, .glyph_index = 12210}, /*Unicode: U+f093 ()*/
66
{.w_px = 37, .glyph_index = 12600}, /*Unicode: U+f095 ()*/
67
{.w_px = 25, .glyph_index = 13170}, /*Unicode: U+f0c4 ()*/
68
{.w_px = 23, .glyph_index = 13560}, /*Unicode: U+f0c5 ()*/
69
{.w_px = 24, .glyph_index = 13920}, /*Unicode: U+f0c7 ()*/
70
{.w_px = 13, .glyph_index = 14280}, /*Unicode: U+f0e7 ()*/
71
{.w_px = 18, .glyph_index = 14490}, /*Unicode: U+f0f3 ()*/
72
{.w_px = 33, .glyph_index = 14760}, /*Unicode: U+f11c ()*/
73
{.w_px = 25, .glyph_index = 15270}, /*Unicode: U+f124 ()*/
74
{.w_px = 20, .glyph_index = 15660}, /*Unicode: U+f15b ()*/
75
{.w_px = 29, .glyph_index = 15960}, /*Unicode: U+f1eb ()*/
76
{.w_px = 38, .glyph_index = 16410}, /*Unicode: U+f240 ()*/
77
{.w_px = 38, .glyph_index = 16980}, /*Unicode: U+f241 ()*/
78
{.w_px = 38, .glyph_index = 17550}, /*Unicode: U+f242 ()*/
79
{.w_px = 38, .glyph_index = 18120}, /*Unicode: U+f243 ()*/
80
{.w_px = 38, .glyph_index = 18690}, /*Unicode: U+f244 ()*/
81
{.w_px = 29, .glyph_index = 19260}, /*Unicode: U+f293 ()*/
82
83
#elif USE_HEKATE_SYMBOL_30 == 8
84
{.w_px = 7, .glyph_index = 0}, /*Unicode: U+f001 ()*/
85
{.w_px = 25, .glyph_index = 210}, /*Unicode: U+f008 ()*/
86
{.w_px = 27, .glyph_index = 960}, /*Unicode: U+f00b ()*/
87
{.w_px = 31, .glyph_index = 1770}, /*Unicode: U+f00c ()*/
88
{.w_px = 22, .glyph_index = 2700}, /*Unicode: U+f00d ()*/
89
{.w_px = 25, .glyph_index = 3360}, /*Unicode: U+f011 ()*/
90
{.w_px = 25, .glyph_index = 4110}, /*Unicode: U+f013 ()*/
91
{.w_px = 23, .glyph_index = 4860}, /*Unicode: U+f014 ()*/
92
{.w_px = 34, .glyph_index = 5550}, /*Unicode: U+f015 ()*/
93
{.w_px = 25, .glyph_index = 6570}, /*Unicode: U+f019 ()*/
94
{.w_px = 32, .glyph_index = 7320}, /*Unicode: U+f01c ()*/
95
{.w_px = 25, .glyph_index = 8280}, /*Unicode: U+f021 ()*/
96
{.w_px = 25, .glyph_index = 9030}, /*Unicode: U+f026 ()*/
97
{.w_px = 25, .glyph_index = 9780}, /*Unicode: U+f027 ()*/
98
{.w_px = 20, .glyph_index = 10530}, /*Unicode: U+f028 ()*/
99
{.w_px = 20, .glyph_index = 11130}, /*Unicode: U+f03e ()*/
100
{.w_px = 25, .glyph_index = 11730}, /*Unicode: U+f040 ()*/
101
{.w_px = 20, .glyph_index = 12480}, /*Unicode: U+f048 ()*/
102
{.w_px = 20, .glyph_index = 13080}, /*Unicode: U+f04b ()*/
103
{.w_px = 20, .glyph_index = 13680}, /*Unicode: U+f04c ()*/
104
{.w_px = 13, .glyph_index = 14280}, /*Unicode: U+f04d ()*/
105
{.w_px = 32, .glyph_index = 14670}, /*Unicode: U+f051 ()*/
106
{.w_px = 30, .glyph_index = 15630}, /*Unicode: U+f052 ()*/
107
{.w_px = 16, .glyph_index = 16530}, /*Unicode: U+f053 ()*/
108
{.w_px = 16, .glyph_index = 17010}, /*Unicode: U+f054 ()*/
109
{.w_px = 25, .glyph_index = 17490}, /*Unicode: U+f067 ()*/
110
{.w_px = 25, .glyph_index = 18240}, /*Unicode: U+f068 ()*/
111
{.w_px = 27, .glyph_index = 18990}, /*Unicode: U+f071 ()*/
112
{.w_px = 29, .glyph_index = 19800}, /*Unicode: U+f074 ()*/
113
{.w_px = 26, .glyph_index = 20670}, /*Unicode: U+f077 ()*/
114
{.w_px = 26, .glyph_index = 21450}, /*Unicode: U+f078 ()*/
115
{.w_px = 25, .glyph_index = 22230}, /*Unicode: U+f079 ()*/
116
{.w_px = 29, .glyph_index = 22980}, /*Unicode: U+f07b ()*/
117
{.w_px = 25, .glyph_index = 23850}, /*Unicode: U+f093 ()*/
118
{.w_px = 37, .glyph_index = 24600}, /*Unicode: U+f095 ()*/
119
{.w_px = 25, .glyph_index = 25710}, /*Unicode: U+f0c4 ()*/
120
{.w_px = 23, .glyph_index = 26460}, /*Unicode: U+f0c5 ()*/
121
{.w_px = 24, .glyph_index = 27150}, /*Unicode: U+f0c7 ()*/
122
{.w_px = 13, .glyph_index = 27870}, /*Unicode: U+f0e7 ()*/
123
{.w_px = 18, .glyph_index = 28260}, /*Unicode: U+f0f3 ()*/
124
{.w_px = 33, .glyph_index = 28800}, /*Unicode: U+f11c ()*/
125
{.w_px = 25, .glyph_index = 29790}, /*Unicode: U+f124 ()*/
126
{.w_px = 20, .glyph_index = 30540}, /*Unicode: U+f15b ()*/
127
{.w_px = 29, .glyph_index = 31140}, /*Unicode: U+f1eb ()*/
128
{.w_px = 38, .glyph_index = 32010}, /*Unicode: U+f240 ()*/
129
{.w_px = 38, .glyph_index = 33150}, /*Unicode: U+f241 ()*/
130
{.w_px = 38, .glyph_index = 34290}, /*Unicode: U+f242 ()*/
131
{.w_px = 38, .glyph_index = 35430}, /*Unicode: U+f243 ()*/
132
{.w_px = 38, .glyph_index = 36570}, /*Unicode: U+f244 ()*/
133
{.w_px = 29, .glyph_index = 37710}, /*Unicode: U+f293 ()*/
134
135
#endif
136
};
137
138
lv_font_t hekate_symbol_30 =
139
{
140
.unicode_first = LV_SYMBOL_GLYPH_FIRST, /*First Unicode letter in this font*/
141
.unicode_last = LV_SYMBOL_GLYPH_LAST, /*Last Unicode letter in this font*/
142
.h_px = 30, /*Font height in pixels*/
143
//.glyph_bitmap = hekate_symbol_30_glyph_bitmap, /*Bitmap of glyphs*/
144
.glyph_bitmap = (const uint8_t *)(NYX_RES_ADDR + 0x14200),
145
.glyph_dsc = hekate_symbol_30_glyph_dsc, /*Description of glyphs*/
146
.glyph_cnt = 50, /*Number of glyphs in the font*/
147
.unicode_list = NULL, /*List of unicode characters*/
148
.get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/
149
.get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/
150
#if USE_HEKATE_SYMBOL_30 == 4
151
.bpp = 4, /*Bit per pixel*/
152
#elif USE_HEKATE_SYMBOL_30 == 8
153
.bpp = 8, /*Bit per pixel*/
154
#endif
155
.monospace = 0, /*Fix width (0: if not used)*/
156
.next_page = NULL, /*Pointer to a font extension*/
157
};
158
159
#endif /*USE_HEKATE_SYMBOL_30*/
160
161