shithub: riscv

ref: 479a31ae8f4a361b101aa203aa1c0822137708d7
dir: /sys/src/libdraw/freesubfont.c/

View raw version
#include <u.h>
#include <libc.h>
#include <draw.h>

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