smeargle-gd/src/font.h

23 lines
464 B
C
Raw Normal View History

2023-11-27 21:38:00 +00:00
typedef struct map_t {
2023-11-27 23:33:40 +00:00
const char *glyph;
unsigned int index;
2023-11-27 21:38:00 +00:00
unsigned int width;
struct map_t *next;
} map_t;
typedef struct {
char *name;
char *image_filename;
2023-11-27 21:38:00 +00:00
unsigned char bits_per_pixel;
unsigned int width;
unsigned int height;
unsigned int map_entries;
map_t *map;
} font_t;
2023-11-27 23:21:09 +00:00
font_t font_create(char *name, char *filename);
void font_destroy(font_t font);
unsigned int map_create(toml_table_t *table, map_t **map);
void map_destroy(map_t *map);