aboutsummaryrefslogtreecommitdiff
path: root/src/libdraw/freesubfont.c
blob: 16b2ef3e89c25f4a533634d5eb94ae04947ad7d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <u.h>
#include <libc.h>
#include <draw.h>

void
freesubfont(Subfont *f)
{
	if(f == 0)
		return;
	f->ref--;
	if(f->ref > 0)
		return;
	uninstallsubfont(f);
	free(f->info);	/* note: f->info must have been malloc'ed! */
	free(f->name);
	freeimage(f->bits);
	free(f);
}