forked from xiongyihui/ezdib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathezdibfont.h
81 lines (64 loc) · 1.21 KB
/
ezdibfont.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
#include "ezdibconf.h"
#if defined( __cplusplus )
extern "C"
{
#endif
#if !defined( EZD_NOPACK )
# pragma pack( push, 1 )
#endif
typedef struct
{
char fileID[5];
int bbx_height;
int bbx_yoffset;
int average_width_tenths;
} font_ident_t;
typedef struct _bbxfont
{
unsigned char width;
unsigned char height;
signed char xoffset;
signed char yoffset;
} bbxFont;
typedef struct _bbx
{
unsigned char width;
unsigned char height;
signed char xoffset;
signed char yoffset;
} bbxGlyph;
typedef struct _glyph
{
unsigned char encoding;
signed char xoffsetnext;
signed char yoffsetnext;
bbxGlyph bbox;
} tGlyph;
#define EZD_FONT_ID_FIELD_LEN 16
#if !defined( EZD_STATIC_FONTS )
// This structure contains the memory image
typedef struct _SFontData
{
bbxFont bbox;
unsigned int spacing;
/// Font flags
unsigned int uFlags;
font_ident_t ID;
/// Font index pointers
const unsigned char *pIndex[256];
/// Font bitmap data
unsigned char pGlyph[1];
} SFontData;
typedef struct _ezdipFontData
{
bbxFont bbx;
// followed by glyphs
} ezdibFontData;
#endif
#if !defined( EZD_NOPACK )
# pragma pack( pop )
#endif
#if defined( __cplusplus )
}
#endif