#include #include "uiLibrary.h" #include "widget/widget.h" // ----------------------------------------------------------------------------- // Library. bool uiInit(void) { // TODO: Embed the font into the library instead. const char* font_path = "../ui/fontbaker/NK57.bin"; if (!(g_ui.font = LoadFontAtlas(font_path))) { return false; } // TODO: Remove. const FontHeader* header = &g_ui.font->header; const int glyph_size = header->glyph_width * header->glyph_height; const int atlas_size = header->num_glyphs * glyph_size; printf("Loaded font: %s\n", font_path); printf( "Glyph: %dx%d (%d bytes)\n", header->glyph_width, header->glyph_height, glyph_size); printf( "Atlas: %dx%d (%d bytes)\n", header->num_glyphs * header->glyph_width, header->glyph_height, atlas_size); return true; } void uiShutdown(void) {}