| 64 asc_dprintf("Closed font size %u, style %u", entry->font.size, entry->font.style); |
64 asc_dprintf("Closed font size %u, style %u", entry->font.size, entry->font.style); |
| 65 } |
65 } |
| 66 |
66 |
| 67 void asc_font_cache_init(void) { |
67 void asc_font_cache_init(void) { |
| 68 assert(asc_font_cache == NULL); |
68 assert(asc_font_cache == NULL); |
| 69 asc_font_cache = cxArrayListCreateSimple( |
69 asc_font_cache = cxArrayListCreate( |
| 70 sizeof(struct asc_font_cache_entry), 16 |
70 NULL, sizeof(struct asc_font_cache_entry), 16 |
| 71 ); |
71 ); |
| 72 cxDefineDestructor(asc_font_cache, asc_font_unload); |
72 cxSetDestructor(asc_font_cache, asc_font_unload); |
| 73 } |
73 } |
| 74 |
74 |
| 75 void asc_font_cache_destroy(void) { |
75 void asc_font_cache_destroy(void) { |
| 76 assert(asc_font_cache != NULL); |
76 assert(asc_font_cache != NULL); |
| 77 cxListFree(asc_font_cache); |
77 cxListFree(asc_font_cache); |