transformedfont_t*f = rfx_calloc(sizeof(transformedfont_t));
f->orig = orig;
f->matrix = *m;
- f->used = malloc(sizeof(f->used[0])*orig->num_glyphs);
+ f->used = rfx_calloc(sizeof(f->used[0])*orig->num_glyphs);
int t;
for(t=0;t<orig->num_glyphs;t++) {
if(orig->glyphs[t].unicode==32)
static gfxfont_t* createGfxFont(FontInfo*src)
{
- gfxfont_t*font = (gfxfont_t*)malloc(sizeof(gfxfont_t));
- memset(font, 0, sizeof(gfxfont_t));
+ gfxfont_t*font = (gfxfont_t*)rfx_calloc(sizeof(gfxfont_t));
font->glyphs = (gfxglyph_t*)malloc(sizeof(gfxglyph_t)*src->num_glyphs);
memset(font->glyphs, 0, sizeof(gfxglyph_t)*src->num_glyphs);