void fz_dropfont(fz_font *font) { int fterr; int i; if (font && --font->refs == 0) { if (font->t3procs) { for (i = 0; i < 256; i++) if (font->t3procs[i]) fz_droptree(font->t3procs[i]); { /* HACK: make sure the static pixmap is freed through a dummy call */ fz_glyph glyph; fz_matrix tmr = { 0 }; font->t3procs[0] = nil; fz_rendert3glyph(&glyph, font, 0, tmr); } fz_free(font->t3procs); fz_free(font->t3widths); } if (font->ftface) { fterr = FT_Done_Face((FT_Face)font->ftface); if (fterr) fz_warn("freetype finalizing face: %s", ft_errorstring(fterr)); fz_finalizefreetype(); } fz_free(font); } }
static void t3dropfont(fz_font *font) { int i; pdf_font *pfont = (pdf_font*)font; if (pfont->encoding) pdf_dropcmap(pfont->encoding); for (i = 0; i < 256; i++) if (pfont->charprocs[i]) fz_droptree(pfont->charprocs[i]); }
void fz_droplinknode(fz_linknode *node) { fz_droptree(node->tree); }