summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-font.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-02-27 19:48:01 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-03-07 12:19:15 +0100
commit4839427ab02dcebcc4c7703d7a04c4bdea6fac18 (patch)
treeb055da40312bac611520303bf833647bd0febaf0 /source/pdf/pdf-font.c
parent4614c7472c7eb43bde8ffbbcf37e207e4c83a143 (diff)
downloadmupdf-4839427ab02dcebcc4c7703d7a04c4bdea6fac18.tar.xz
Distinguish between simple and CID font resources in cache.
Diffstat (limited to 'source/pdf/pdf-font.c')
-rw-r--r--source/pdf/pdf-font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c
index 8ca89e93..9e8a50dc 100644
--- a/source/pdf/pdf-font.c
+++ b/source/pdf/pdf-font.c
@@ -2099,7 +2099,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_font_resource(ctx, doc, font->buffer, digest);
+ fref = pdf_find_font_resource(ctx, doc, PDF_CID_FONT_RESOURCE, font->buffer, digest);
if (fref == NULL)
{
/* Set up desc, width, and font file */
@@ -2174,7 +2174,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_font_resource(ctx, doc, font->buffer, digest);
+ fref = pdf_find_font_resource(ctx, doc, PDF_SIMPLE_FONT_RESOURCE, font->buffer, digest);
if (fref == NULL)
{
fobj = pdf_new_dict(ctx, doc, 10);