From 9934f27cc16e8a2da43033a1f957761e00db4916 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 16 Feb 2014 11:57:21 +0100 Subject: The fundamentals of the new ctypes interface are working --- host/font.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'host/font.h') 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); -- cgit