From 573ec2157b5bcc4c7798ebd7ef6e7d85612df949 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 3 Dec 2009 01:17:53 +0100 Subject: Load content stream buffers instead of parsing into a display tree in xobjects, patterns, type 3 fonts and pages. --- fitz/fitz_res.h | 3 ++- fitz/res_font.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'fitz') diff --git a/fitz/fitz_res.h b/fitz/fitz_res.h index fbb780ff..6064a317 100644 --- a/fitz/fitz_res.h +++ b/fitz/fitz_res.h @@ -195,7 +195,8 @@ struct fz_font_s int fthint; /* ... force hinting for DynaLab fonts */ fz_matrix t3matrix; - struct fz_tree_s **t3procs; /* has 256 entries if used */ + fz_obj *t3resources; + fz_buffer **t3procs; /* has 256 entries if used */ float *t3widths; /* has 256 entries if used */ fz_irect bbox; diff --git a/fitz/res_font.c b/fitz/res_font.c index 64ba5730..b06c4e4f 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -22,6 +22,7 @@ fz_newfont(void) font->fthint = 0; font->t3matrix = fz_identity(); + font->t3resources = nil; font->t3procs = nil; font->t3widths = nil; @@ -50,9 +51,11 @@ fz_dropfont(fz_font *font) { if (font->t3procs) { + if (font->t3resources) + fz_dropobj(font->t3resources); for (i = 0; i < 256; i++) if (font->t3procs[i]) - ; // XXX fz_droptree(font->t3procs[i]); + fz_dropbuffer(font->t3procs[i]); fz_free(font->t3procs); fz_free(font->t3widths); } -- cgit v1.2.3