From 4839427ab02dcebcc4c7703d7a04c4bdea6fac18 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 27 Feb 2018 19:48:01 +0100 Subject: Distinguish between simple and CID font resources in cache. --- source/pdf/pdf-font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/pdf/pdf-font.c') 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); -- cgit v1.2.3