aboutsummaryrefslogtreecommitdiff
path: root/host/font.h
diff options
context:
space:
mode:
authorjaseg <jaseg@jaseg.net>2014-02-16 11:57:21 +0100
committerjaseg <jaseg@jaseg.net>2014-02-16 11:57:54 +0100
commit9934f27cc16e8a2da43033a1f957761e00db4916 (patch)
tree217e92d44322d5b1c08e835f775e11ef3ffd9910 /host/font.h
parent900a9c38e38e5ecb0b2c69a344665b03f148124b (diff)
downloadmatelight-9934f27cc16e8a2da43033a1f957761e00db4916.tar.gz
matelight-9934f27cc16e8a2da43033a1f957761e00db4916.tar.bz2
matelight-9934f27cc16e8a2da43033a1f957761e00db4916.zip
The fundamentals of the new ctypes interface are working
Diffstat (limited to 'host/font.h')
-rw-r--r--host/font.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/host/font.h b/host/font.h
index 4a7fe63..e9fbb35 100644
--- a/host/font.h
+++ b/host/font.h
@@ -15,7 +15,7 @@ typedef struct {
} glyph_t;
typedef struct {
- glyph_t *t;
+ glyph_t **data;
size_t size;
} glyphtable_t;
@@ -25,7 +25,9 @@ typedef struct {
#define MAX_CSI_ELEMENTS 8
// We could also use some fancy hashtable here, but unifont includes about 57k glyphs so we would hardly save any memory.
-int read_bdf(FILE *f, glyph_t **glyph_table, unsigned int glyph_table_size);
+glyphtable_t *read_bdf(FILE *f);
+
+void free_glyphtable(glyphtable_t *glyph_table);
// Requires buf to point to a buffer at least of size glyph->width*glyph->height.
void render_glyph(glyph_t *glyph, color_t *buf, unsigned int bufwidth, unsigned int offx, unsigned int offy, color_t fg, color_t bg);