#pragma once #include "freetype/freetype.h" #include "hash.h" #include "utils.h" enum font_context_error_e { FONT_CONTEXT_ERROR_NONE, FONT_CONTEXT_ERROR_LIBRARY, }; struct font_context_s { FT_Library library; }; enum font_context_error_e wayc_font_context_init(struct font_context_s* ctx); void wayc_font_context_deinit(struct font_context_s* ctx); struct glyph_s {}; struct font_cache_s { struct hashmap_s glyphs; }; enum font_error_e { FONT_ERROR_NONE, FONT_ERROR_FILE_LOAD, FONT_ERROR_FONT_LOAD, }; struct font_s { u8* data; FT_Face face; struct font_cache_s cache; }; enum font_error_e wayc_font_init(struct font_s* font, struct font_context_s* ctx, const char* path); void wayc_font_deinit(struct font_s* font);