cpmish/utils/libbdf.h
David Given 505bcd56cf Add a custom BDF font loader; change the NC200 font converter to use it rather
than netpbm, as netpbm produces inconsistent results depending on which version
you're using.
2020-07-25 01:04:36 +02:00

27 lines
342 B
C

#ifndef LIBBDF_H
#define LIBBDF_H
#include <stdint.h>
typedef struct bdf BDF;
typedef struct glyph Glyph;
struct bdf
{
int width, height;
int ascent, descent;
Glyph* glyphs[256];
};
struct glyph
{
int width, height;
int dx, dy;
uint8_t* data;
};
extern BDF* bdf_load(const char* filename);
extern void bdf_free(BDF* bdf);
#endif