MCPcopy Create free account
hub / github.com/NetHack/NetHack / free_font

Function free_font

sys/msdos/font.c:140–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void
141free_font(struct BitmapFont *font)
142{
143 unsigned i, j;
144
145 if (font == NULL) return;
146
147 if (font->glyphs != NULL) {
148 for (i = 0; i < font->num_glyphs; ++i)
149 free(font->glyphs[i]);
150 free(font->glyphs);
151 }
152
153 for (i = 0; i < SIZE(font->unicode); ++i) {
154 if (font->unicode[i] == NULL) continue;
155 for (j = 0; j < 256; ++j)
156 free(font->unicode[i][j]);
157 free(font->unicode[i]);
158 }
159
160 free(font);
161}
162
163const unsigned char *
164get_font_glyph(struct BitmapFont *font, uint32 ch, boolean unicode)

Callers 3

vga_InitFunction · 0.85
load_fontFunction · 0.85
vesa_InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected