summaryrefslogtreecommitdiff
path: root/font.h
blob: 4f82fcae53337f750b16eda95e81e5b2af9e2a13 (plain)
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
#ifndef _FONT_H
#define _FONT_H

#include <SDL2/SDL.h>

#define PSF_MAGIC_NUMBER 0x864ab572

typedef struct {
} PSFFontHeader;

typedef struct {
	uint32_t magic;
	uint32_t version;
	uint32_t header_size;
	uint32_t flags;
	uint32_t num_glyphs;
	uint32_t bytes_per_glyph;
	uint32_t height;
	uint32_t width;
	uint8_t *glyph_data;
} PSFFont;

PSFFont font_load(const char *);
SDL_Texture *font_create_texture(SDL_Renderer *, PSFFont *);
void font_destroy(PSFFont *);

#endif