-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfontheader.h
65 lines (52 loc) · 891 Bytes
/
fontheader.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
62
63
64
65
#ifndef __FONTHEADER_H_
#define __FONTHEADER_H_
//#define GLYPHGROUPS 32
#define GLYPHGROUPS 64
#include <stdint.h>
/*
typedef struct {
uint16_t x;
uint16_t y;
} point_t_base;
typedef union {
uint32_t i;
// point_t_base p;
struct {
uint16_t x;
uint16_t y;
};
} point_t;
*/
typedef struct {
int16_t x;
int16_t y;
} point_t;
typedef union {
int16_t i[6];
point_t p[3];
} bezier_t;
typedef struct {
int16_t x;
uint8_t y;
int8_t action;
} fillpixel_t;
/*
* actions:
* 0 start fill
* 1 end fill
*
*/
typedef struct {
unsigned char c;
int width;
const bezier_t* data;
int datalen;
uint16_t groupstart[GLYPHGROUPS];
uint16_t grouplen[GLYPHGROUPS];
int pathlen[GLYPHGROUPS];
} glyph_t;
typedef struct {
const bezier_t* data;
uint8_t datalen;
} path_t;
#endif //__FONTHEADER_H_