#ifndef FONT_H #define FONT_H #include "texture.h" #include "util.h" struct asset; struct font_glyph { f32 off_x; f32 off_y; i32 advance; f32 width; f32 height; struct rect atlas_rect; }; struct font { f32 point_size; struct texture texture; u16 glyphs_count; struct font_glyph *glyphs; u16 *lookup; }; void font_startup(void); struct asset *font_load_asset(struct string path, f32 point_size, b32 help); struct font *font_load_async(struct string path, f32 point_size); struct font *font_load(struct string path, f32 point_size); struct font_glyph *font_get_glyph(struct font *font, u8 c); #endif