Add missing function to free FontRenderer
This commit is contained in:
parent
0389bd000a
commit
91a82d8ae4
|
@ -9,6 +9,11 @@ FontRenderer *FontRendererNew(unsigned int flags) {
|
|||
return (FontRenderer *) font_renderer;
|
||||
}
|
||||
|
||||
void FontRendererFree(FontRenderer *fr_) {
|
||||
font_renderer_alpha *font_renderer = (font_renderer_alpha *) fr_;
|
||||
delete font_renderer;
|
||||
}
|
||||
|
||||
int FontRendererLoadFont(FontRenderer *fr_, const char *filename) {
|
||||
font_renderer_alpha *font_renderer = (font_renderer_alpha *) fr_;
|
||||
bool success = font_renderer->load_font(filename);
|
||||
|
|
|
@ -21,6 +21,7 @@ enum {
|
|||
};
|
||||
|
||||
FontRenderer *FontRendererNew(unsigned int flags);
|
||||
void FontRendererFree(FontRenderer *);
|
||||
int FontRendererLoadFont(FontRenderer *, const char *filename);
|
||||
int FontRendererGetFontHeight(FontRenderer *, float size);
|
||||
int FontRendererBakeFontBitmap(FontRenderer *, int font_height,
|
||||
|
|
|
@ -212,6 +212,7 @@ void ren_free_font(RenFont *font) {
|
|||
}
|
||||
}
|
||||
free(font->data);
|
||||
FontRendererFree(font->renderer);
|
||||
free(font);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue