-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFont.h
More file actions
43 lines (31 loc) · 749 Bytes
/
Font.h
File metadata and controls
43 lines (31 loc) · 749 Bytes
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
#pragma once
#include "GLWindow.h"
class Font
{
public:
friend class Text;
Font();
Font(const unsigned &texture, const unsigned &texturesize, const int *fontinfo, const unsigned &infosize);
unsigned Texture() const{ return texture; };
void Init(const unsigned &texture, const unsigned &texturesize, const int *fontinfo, const unsigned &infosize);
float LineHeight() const{ return lineheight; };
float Border() const{ return border; };
protected:
struct Glyph
{
float width;
float height;
float offsetx;
float offsety;
float advance;
unsigned short u0;
unsigned short v0;
unsigned short u1;
unsigned short v1;
};
unsigned texture;
float spaceadvance;
float lineheight;
float border;
Glyph glyph[94];
};