I can't even

This commit is contained in:
Alessandro Mauri 2023-02-19 23:40:58 +01:00
parent 805f633af0
commit dcce0ed11b
No known key found for this signature in database
GPG key ID: 2B7BF9531FF03BE8
11 changed files with 611 additions and 165 deletions

View file

@ -24,13 +24,19 @@ struct font_glyph {
unsigned int u, v, w, h;
};
struct font_atlas {
unsigned int glyphs, width, height;
unsigned char *atlas;
int file_size;
char *file;
void *priv;
};
struct font_atlas;
struct font_atlas * font_init(void);
int font_load(struct font_atlas *atlas, const char *path);
int font_free(struct font_atlas *atlas);
const struct font_glyph * font_get_glyph_texture(struct font_atlas *atlas, unsigned int code);
const struct font_glyph * font_get_glyph_texture(struct font_atlas *atlas, unsigned int code, int *updated);
void font_dump(const struct font_atlas *atlas, const char *path);
#endif