forked from SeraphYuki/zimedit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfreetype.h
More file actions
executable file
·40 lines (36 loc) · 988 Bytes
/
freetype.h
File metadata and controls
executable file
·40 lines (36 loc) · 988 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
#ifndef FREETYPE_DEF
#define FREETYPE_DEF
#include "math.h"
#include <ft2build.h>
#include <string.h>
#include <freetype/freetype.h>
#include <freetype/ftglyph.h>
#include <freetype/ftoutln.h>
#include <freetype/fttrigon.h>
#include FT_FREETYPE_H
typedef struct {
float ax;
float ay;
float bw;
float bh;
float bl;
float bt;
float tx;
float ty;
} Thoth_FontCharacter;
typedef struct {
unsigned int fontTexture;
FT_Face fontFace;
float atlasWidth;
float atlasHeight;
int fontSize;
int fontHeight;
Thoth_FontCharacter fontCharacters[128];
} Thoth_FontFace;
// Vec2 FontFace_GetTextSize(FontFace *font, const char *text, int len, float sx, float sy);
void Thoth_Text_Close();
void Thoth_Text_Init();
void Thoth_FontFace_Delete(Thoth_FontFace *font);
int Thoth_FontFace_LoadFont(Thoth_FontFace *font, const char *path);
int Thoth_FontFace_SetSize(Thoth_FontFace *font, int size);
#endif