summaryrefslogtreecommitdiff
path: root/pdf/pdf_fontTT.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2021-11-02 08:11:51 +0000
committerChris Liddell <chris.liddell@artifex.com>2021-11-02 15:49:34 +0000
commitf3d80c26c4916ba112bf1365d2d03e6473c542a9 (patch)
tree07393b2b6de974741fcbf348873fb1eb9abd341c /pdf/pdf_fontTT.c
parent682f68ddae2ce941121217cbf417841a8bc407a9 (diff)
downloadghostpdl-f3d80c26c4916ba112bf1365d2d03e6473c542a9.tar.gz
Bug 704678: Make sure to store obj/generation number in font objects
For Truetype fonts, the lines that copied the object and generation numbers from the font dictionary object to the new font object had been dropped, thus meaning we'd no longer cache the font objects, and reuse them. Reinstate that. And make sure both values are stored for all fonts. And, again for all fonts, also store the indirect num/generation values - generally not much use (for these objects), but in the interest of consistency....
Diffstat (limited to 'pdf/pdf_fontTT.c')
-rw-r--r--pdf/pdf_fontTT.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pdf/pdf_fontTT.c b/pdf/pdf_fontTT.c
index d898011fb..3d0717ff4 100644
--- a/pdf/pdf_fontTT.c
+++ b/pdf/pdf_fontTT.c
@@ -383,6 +383,10 @@ int pdfi_read_truetype_font(pdf_context *ctx, pdf_dict *font_dict, pdf_dict *str
code = gs_note_error(gs_error_invalidfont);
goto error;
}
+ font->object_num = font_dict->object_num;
+ font->generation_num = font_dict->generation_num;
+ font->indirect_num = font_dict->indirect_num;
+ font->indirect_gen = font_dict->indirect_gen;
font->FontDescriptor = (pdf_dict *)fontdesc;
fontdesc = NULL;