6.3 Spec 3: Asset Formats
D3-TUI will use SPECTRE’s asset loading for font textures:
/* In d3tui_font.c */
d3tui_font_t *d3tui_font_load(const char *path) {
sh_texture_t tex;
if (sh_tex_load(path, &tex) != 0) {
return NULL;
}
d3tui_font_t *font = (d3tui_font_t *)malloc(sizeof(d3tui_font_t));
font->texture = tex.vram_addr;
font->tex_width = tex.width;
font->tex_height = tex.height;
// Load glyph data from separate file or embedded
// ...
return font;
}