X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=font.h;fp=font.h;h=1077a4764bb914a7ca554ad4e06448a2b96b4498;hp=0000000000000000000000000000000000000000;hb=88a9e026caed5568363cefb7d49308b875dc5e4a;hpb=100372ba9cc83542b9d9894001d70f40e28f8f4b diff --git a/font.h b/font.h new file mode 100644 index 0000000..1077a47 --- /dev/null +++ b/font.h @@ -0,0 +1,20 @@ +// Copyright (C) 2006 Jason Woofenden PUBLIC DOMAIN + +#ifndef __font_h__ +#define __font_h__ + +typedef struct { + SDL_Surface *pixels; + SDL_Rect bounds[94]; + int space_width; + int letter_spacing; +} font; + +font *font_load(const char* filename); // sets as the current font +void font_free(font*); +void font_set(font*); +void font_write(int x, int y, const char* message); +int font_width(const char* message); +int font_height(); + +#endif