diff options
author | Tor Andersson <tor@ghostscript.com> | 2011-02-04 10:33:31 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2011-02-04 10:33:31 +0000 |
commit | 1a78cca0bbdd53ed31ccbc3fb028f397fa8d2d06 (patch) | |
tree | 6199da27eabbce42718ae9ea44120b7f27feea2a /fitz | |
parent | 28846f409d6fee06b9fa9eb3d16672c4a328026b (diff) | |
download | mupdf-1a78cca0bbdd53ed31ccbc3fb028f397fa8d2d06.tar.xz |
Add ftsize and ftfile fields to font struct for SumatraPDF use.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/fitz.h | 4 | ||||
-rw-r--r-- | fitz/res_font.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h index 4032bddf..8f756895 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -663,7 +663,11 @@ struct fz_font_s void *ftface; /* has an FT_Face if used */ int ftsubstitute; /* ... substitute metrics */ int fthint; /* ... force hinting for DynaLab fonts */ + + /* origin of font data */ + char *ftfile; unsigned char *ftdata; + int ftsize; fz_matrix t3matrix; fz_obj *t3resources; diff --git a/fitz/res_font.c b/fitz/res_font.c index 2fddcf2a..a30bbf8b 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -18,7 +18,10 @@ fz_newfont(void) font->ftface = nil; font->ftsubstitute = 0; font->fthint = 0; + + font->ftfile = nil; font->ftdata = nil; + font->ftsize = 0; font->t3matrix = fz_identity; font->t3resources = nil; @@ -72,6 +75,8 @@ fz_dropfont(fz_font *font) fz_finalizefreetype(); } + if (font->ftfile) + fz_free(font->ftfile); if (font->ftdata) fz_free(font->ftdata); |