forked from pitschu/RP2040matrix-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbmfont.h
61 lines (53 loc) · 895 Bytes
/
bmfont.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef _BMFONT_H_
#define _BMFONT_H_
#include <stdbool.h>
#include <stdint.h>
struct info {
const char* face;
const char* charset;
int size;
int stretchH;
int8_t padding[4];
int8_t spacing[2];
bool bold;
bool italic;
bool unicode;
bool smooth;
bool aa;
int8_t outline;
};
struct common {
int lineHeight;
int base;
int scaleW;
int scaleH;
bool packed;
int8_t alphaChnl;
int8_t redChnl;
int8_t greenChnl;
int8_t blueChnl;
};
struct chardata {
int id;
int width, height;
int xoffset, yoffset;
int xadvance;
int offset;
int channel;
};
struct kerning {
int first;
int second;
int amount;
};
struct font {
struct info info;
struct common common;
const uint8_t* data;
int data_size;
int chars_count;
struct chardata* chars;
int kernings_count;
struct kerning* kernings;
};
#endif //_BMFONT_H_