Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/libs/lvgl/lv_fonts/hekate_symbol_20.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_20 != 0 /*Can be enabled in lv_conf.h*/
22
23
/***********************************************************************************
24
* hekate-symbols.ttf 20 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_20_glyph_dsc[] =
30
{
31
#if USE_HEKATE_SYMBOL_20 == 4
32
{.w_px = 5, .glyph_index = 0}, /*Unicode: U+f001 ()*/
33
{.w_px = 16, .glyph_index = 60}, /*Unicode: U+f008 ()*/
34
{.w_px = 20, .glyph_index = 220}, /*Unicode: U+f00b ()*/
35
{.w_px = 22, .glyph_index = 420}, /*Unicode: U+f00c ()*/
36
{.w_px = 16, .glyph_index = 640}, /*Unicode: U+f00d ()*/
37
{.w_px = 18, .glyph_index = 800}, /*Unicode: U+f011 ()*/
38
{.w_px = 18, .glyph_index = 980}, /*Unicode: U+f013 ()*/
39
{.w_px = 16, .glyph_index = 1160}, /*Unicode: U+f014 ()*/
40
{.w_px = 23, .glyph_index = 1320}, /*Unicode: U+f015 ()*/
41
{.w_px = 18, .glyph_index = 1560}, /*Unicode: U+f019 ()*/
42
{.w_px = 23, .glyph_index = 1740}, /*Unicode: U+f01c ()*/
43
{.w_px = 18, .glyph_index = 1980}, /*Unicode: U+f021 ()*/
44
{.w_px = 18, .glyph_index = 2160}, /*Unicode: U+f026 ()*/
45
{.w_px = 18, .glyph_index = 2340}, /*Unicode: U+f027 ()*/
46
{.w_px = 13, .glyph_index = 2520}, /*Unicode: U+f028 ()*/
47
{.w_px = 13, .glyph_index = 2660}, /*Unicode: U+f03e ()*/
48
{.w_px = 16, .glyph_index = 2800}, /*Unicode: U+f040 ()*/
49
{.w_px = 13, .glyph_index = 2960}, /*Unicode: U+f048 ()*/
50
{.w_px = 13, .glyph_index = 3100}, /*Unicode: U+f04b ()*/
51
{.w_px = 13, .glyph_index = 3240}, /*Unicode: U+f04c ()*/
52
{.w_px = 9, .glyph_index = 3380}, /*Unicode: U+f04d ()*/
53
{.w_px = 23, .glyph_index = 3480}, /*Unicode: U+f051 ()*/
54
{.w_px = 21, .glyph_index = 3720}, /*Unicode: U+f052 ()*/
55
{.w_px = 11, .glyph_index = 3940}, /*Unicode: U+f053 ()*/
56
{.w_px = 11, .glyph_index = 4060}, /*Unicode: U+f054 ()*/
57
{.w_px = 18, .glyph_index = 4180}, /*Unicode: U+f067 ()*/
58
{.w_px = 18, .glyph_index = 4360}, /*Unicode: U+f068 ()*/
59
{.w_px = 20, .glyph_index = 4540}, /*Unicode: U+f071 ()*/
60
{.w_px = 20, .glyph_index = 4740}, /*Unicode: U+f074 ()*/
61
{.w_px = 18, .glyph_index = 4940}, /*Unicode: U+f077 ()*/
62
{.w_px = 18, .glyph_index = 5120}, /*Unicode: U+f078 ()*/
63
{.w_px = 18, .glyph_index = 5300}, /*Unicode: U+f079 ()*/
64
{.w_px = 20, .glyph_index = 5480}, /*Unicode: U+f07b ()*/
65
{.w_px = 18, .glyph_index = 5680}, /*Unicode: U+f093 ()*/
66
{.w_px = 25, .glyph_index = 5860}, /*Unicode: U+f095 ()*/
67
{.w_px = 18, .glyph_index = 6120}, /*Unicode: U+f0c4 ()*/
68
{.w_px = 16, .glyph_index = 6300}, /*Unicode: U+f0c5 ()*/
69
{.w_px = 17, .glyph_index = 6460}, /*Unicode: U+f0c7 ()*/
70
{.w_px = 8, .glyph_index = 6640}, /*Unicode: U+f0e7 ()*/
71
{.w_px = 12, .glyph_index = 6720}, /*Unicode: U+f0f3 ()*/
72
{.w_px = 23, .glyph_index = 6840}, /*Unicode: U+f11c ()*/
73
{.w_px = 18, .glyph_index = 7080}, /*Unicode: U+f124 ()*/
74
{.w_px = 13, .glyph_index = 7260}, /*Unicode: U+f15b ()*/
75
{.w_px = 20, .glyph_index = 7400}, /*Unicode: U+f1eb ()*/
76
{.w_px = 26, .glyph_index = 7600}, /*Unicode: U+f240 ()*/
77
{.w_px = 26, .glyph_index = 7860}, /*Unicode: U+f241 ()*/
78
{.w_px = 26, .glyph_index = 8120}, /*Unicode: U+f242 ()*/
79
{.w_px = 26, .glyph_index = 8380}, /*Unicode: U+f243 ()*/
80
{.w_px = 26, .glyph_index = 8640}, /*Unicode: U+f244 ()*/
81
{.w_px = 20, .glyph_index = 8900}, /*Unicode: U+f293 ()*/
82
83
#elif USE_HEKATE_SYMBOL_20 == 8
84
{.w_px = 5, .glyph_index = 0}, /*Unicode: U+f001 ()*/
85
{.w_px = 16, .glyph_index = 100}, /*Unicode: U+f008 ()*/
86
{.w_px = 20, .glyph_index = 420}, /*Unicode: U+f00b ()*/
87
{.w_px = 22, .glyph_index = 820}, /*Unicode: U+f00c ()*/
88
{.w_px = 16, .glyph_index = 1260}, /*Unicode: U+f00d ()*/
89
{.w_px = 18, .glyph_index = 1580}, /*Unicode: U+f011 ()*/
90
{.w_px = 18, .glyph_index = 1940}, /*Unicode: U+f013 ()*/
91
{.w_px = 16, .glyph_index = 2300}, /*Unicode: U+f014 ()*/
92
{.w_px = 23, .glyph_index = 2620}, /*Unicode: U+f015 ()*/
93
{.w_px = 18, .glyph_index = 3080}, /*Unicode: U+f019 ()*/
94
{.w_px = 23, .glyph_index = 3440}, /*Unicode: U+f01c ()*/
95
{.w_px = 18, .glyph_index = 3900}, /*Unicode: U+f021 ()*/
96
{.w_px = 18, .glyph_index = 4260}, /*Unicode: U+f026 ()*/
97
{.w_px = 18, .glyph_index = 4620}, /*Unicode: U+f027 ()*/
98
{.w_px = 13, .glyph_index = 4980}, /*Unicode: U+f028 ()*/
99
{.w_px = 13, .glyph_index = 5240}, /*Unicode: U+f03e ()*/
100
{.w_px = 16, .glyph_index = 5500}, /*Unicode: U+f040 ()*/
101
{.w_px = 13, .glyph_index = 5820}, /*Unicode: U+f048 ()*/
102
{.w_px = 13, .glyph_index = 6080}, /*Unicode: U+f04b ()*/
103
{.w_px = 13, .glyph_index = 6340}, /*Unicode: U+f04c ()*/
104
{.w_px = 9, .glyph_index = 6600}, /*Unicode: U+f04d ()*/
105
{.w_px = 23, .glyph_index = 6780}, /*Unicode: U+f051 ()*/
106
{.w_px = 21, .glyph_index = 7240}, /*Unicode: U+f052 ()*/
107
{.w_px = 11, .glyph_index = 7660}, /*Unicode: U+f053 ()*/
108
{.w_px = 11, .glyph_index = 7880}, /*Unicode: U+f054 ()*/
109
{.w_px = 18, .glyph_index = 8100}, /*Unicode: U+f067 ()*/
110
{.w_px = 18, .glyph_index = 8460}, /*Unicode: U+f068 ()*/
111
{.w_px = 20, .glyph_index = 8820}, /*Unicode: U+f071 ()*/
112
{.w_px = 20, .glyph_index = 9220}, /*Unicode: U+f074 ()*/
113
{.w_px = 18, .glyph_index = 9620}, /*Unicode: U+f077 ()*/
114
{.w_px = 18, .glyph_index = 9980}, /*Unicode: U+f078 ()*/
115
{.w_px = 18, .glyph_index = 10340}, /*Unicode: U+f079 ()*/
116
{.w_px = 20, .glyph_index = 10700}, /*Unicode: U+f07b ()*/
117
{.w_px = 18, .glyph_index = 11100}, /*Unicode: U+f093 ()*/
118
{.w_px = 25, .glyph_index = 11460}, /*Unicode: U+f095 ()*/
119
{.w_px = 18, .glyph_index = 11960}, /*Unicode: U+f0c4 ()*/
120
{.w_px = 16, .glyph_index = 12320}, /*Unicode: U+f0c5 ()*/
121
{.w_px = 17, .glyph_index = 12640}, /*Unicode: U+f0c7 ()*/
122
{.w_px = 8, .glyph_index = 12980}, /*Unicode: U+f0e7 ()*/
123
{.w_px = 12, .glyph_index = 13140}, /*Unicode: U+f0f3 ()*/
124
{.w_px = 23, .glyph_index = 13380}, /*Unicode: U+f11c ()*/
125
{.w_px = 18, .glyph_index = 13840}, /*Unicode: U+f124 ()*/
126
{.w_px = 13, .glyph_index = 14200}, /*Unicode: U+f15b ()*/
127
{.w_px = 20, .glyph_index = 14460}, /*Unicode: U+f1eb ()*/
128
{.w_px = 26, .glyph_index = 14860}, /*Unicode: U+f240 ()*/
129
{.w_px = 26, .glyph_index = 15380}, /*Unicode: U+f241 ()*/
130
{.w_px = 26, .glyph_index = 15900}, /*Unicode: U+f242 ()*/
131
{.w_px = 26, .glyph_index = 16420}, /*Unicode: U+f243 ()*/
132
{.w_px = 26, .glyph_index = 16940}, /*Unicode: U+f244 ()*/
133
{.w_px = 20, .glyph_index = 17460}, /*Unicode: U+f293 ()*/
134
135
#endif
136
};
137
138
lv_font_t hekate_symbol_20 =
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 = 20, /*Font height in pixels*/
143
//.glyph_bitmap = hekate_symbol_20_glyph_bitmap, /*Bitmap of glyphs*/
144
.glyph_bitmap = (const uint8_t *)(NYX_RES_ADDR + 0xFC00),
145
.glyph_dsc = hekate_symbol_20_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_20 == 4
151
.bpp = 4, /*Bit per pixel*/
152
#elif USE_HEKATE_SYMBOL_20 == 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_20*/
160
161