diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-02-24 17:06:00 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-02-29 15:56:45 +0100 |
commit | 2b65dae7e2ae091c03ffe0811aa4e60457a4cd84 (patch) | |
tree | 57593ffc1d970bf67608e5137df3630ed154b31e /source/tools/pdfcreate.c | |
parent | 63c0874392c5159e251514db48891500e9854c5d (diff) | |
download | mupdf-2b65dae7e2ae091c03ffe0811aa4e60457a4cd84.tar.xz |
Pass fz_font to pdf_add_xxx_font_res instead of a fz_buffer.
Make sure all fz_fonts have a ft_buffer available.
Diffstat (limited to 'source/tools/pdfcreate.c')
-rw-r--r-- | source/tools/pdfcreate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/tools/pdfcreate.c b/source/tools/pdfcreate.c index e36e0e68..70d0aa42 100644 --- a/source/tools/pdfcreate.c +++ b/source/tools/pdfcreate.c @@ -371,9 +371,12 @@ static int create_pdf(fz_context *ctx, char *output, resources fonts[], int num_ pch = strchr(content.fonts[k].name, ':'); if (pch != NULL) { + fz_font *font; im_font_buff = fz_read_file(ctx, &(pch[1])); - font_res = pdf_add_simple_font_res(ctx, pdf, im_font_buff); + font = fz_new_font_from_buffer(ctx, NULL, im_font_buff, 0, 0); + font_res = pdf_add_simple_font_res(ctx, pdf, font); fz_drop_buffer(ctx, im_font_buff); + fz_drop_font(ctx, font); im_font_buff = NULL; /* Look through our font page resources and update the indirect |