diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-08-29 16:28:23 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-09-01 15:39:56 +0200 |
commit | f86e9738deb6c6887fb51f2d11e8294cfc1b51cb (patch) | |
tree | 90604c5c291f3ff3334720fd1faefcdfd3906858 /source/pdf/pdf-font.c | |
parent | 1000326aaaeab4ae17a8f93ef6d28e287fb120cc (diff) | |
download | mupdf-f86e9738deb6c6887fb51f2d11e8294cfc1b51cb.tar.xz |
Simplify PDF resource caching table handling.
Diffstat (limited to 'source/pdf/pdf-font.c')
-rw-r--r-- | source/pdf/pdf-font.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c index cc6c68ed..a0bdc5f9 100644 --- a/source/pdf/pdf-font.c +++ b/source/pdf/pdf-font.c @@ -2002,7 +2002,7 @@ pdf_add_cid_font(fz_context *ctx, pdf_document *doc, fz_font *font) /* Before we add this font as a resource check if the same font * already exists in our resources for this doc. If yes, then * hand back that reference */ - fref = pdf_find_resource(ctx, doc, doc->resources->font, font->buffer, digest); + fref = pdf_find_font_resource(ctx, doc, font->buffer, digest); if (fref == NULL) { /* Set up desc, width, and font file */ @@ -2031,7 +2031,7 @@ pdf_add_cid_font(fz_context *ctx, pdf_document *doc, fz_font *font) fref = pdf_add_object(ctx, doc, fobj); /* Add ref to our font resource hash table. */ - fref = pdf_insert_resource(ctx, doc->resources->font, digest, fref); + fref = pdf_insert_font_resource(ctx, doc, digest, fref); } } fz_always(ctx) @@ -2077,7 +2077,7 @@ pdf_add_simple_font(fz_context *ctx, pdf_document *doc, fz_font *font) /* Before we add this font as a resource check if the same font * already exists in our resources for this doc. If yes, then * hand back that reference */ - fref = pdf_find_resource(ctx, doc, doc->resources->font, font->buffer, digest); + fref = pdf_find_font_resource(ctx, doc, font->buffer, digest); if (fref == NULL) { fobj = pdf_new_dict(ctx, doc, 10); @@ -2119,7 +2119,7 @@ pdf_add_simple_font(fz_context *ctx, pdf_document *doc, fz_font *font) fref = pdf_add_object(ctx, doc, fobj); /* Add ref to our font resource hash table. */ - fref = pdf_insert_resource(ctx, doc->resources->font, digest, fref); + fref = pdf_insert_font_resource(ctx, doc, digest, fref); } } fz_always(ctx) |