7. Font Management
7.1 Font Cache
D3-TUI will maintain a cache of loaded fonts to avoid redundant loading:
/* Font cache entry */
typedef struct {
char path[256]; /* Font file path */
d3tui_font_t *font; /* Loaded font */
uint32_t refcount; /* Reference count */
} d3tui_font_cache_entry_t;
/* Font cache */
typedef struct {
d3tui_font_cache_entry_t *entries; /* Array of entries */
size_t count; /* Number of entries */
size_t capacity; /* Maximum capacity */
} d3tui_font_cache_t;