diff options
author | Igor Melichev <igor.melichev@artifex.com> | 2005-11-09 12:55:45 +0000 |
---|---|---|
committer | Igor Melichev <igor.melichev@artifex.com> | 2005-11-09 12:55:45 +0000 |
commit | d26dd94577b018e9184c890592972451c82075a5 (patch) | |
tree | 2643b8700996ef5c53726b4b82eb2b39439ad024 /gs/src/gdevpdti.c | |
parent | 4000f9d9f925c79723c23a97a68559d44df47e01 (diff) |
Fix (pdfwrite) : Provide Resources dictionary for Type 3 fonts.
DETAILS :
Bug 688357 - epstopdf does not include /Resources in Type3 fonts
The PDF specification defines Resources dictionary of a Type 3 font
to be "optional but strongly recommended".
Linux Acrobat Reader Version 7.0.1 07/27/2005 appears not handling the "optional" case.
Now we provide explicit Resources sinse that reader version is widely distributed.
The Resources dictionary of a Type 3 font is a PDF 1.2 feature.
To provide a compatibility to PDF 1.1,
the old code implemented a special mechanizm for transmitting resources of
a Type 3 font to pages, which use the font.
This patch disables that mechanizm when CompatibilityLevel >= 1.2 in gdevpdte.c .
Instead that it creates Resources of a Type 3 font as a cos_dict_t instance
in gdevpdtf.h, gdevpdtt.c, and writes it out when the font is being written
in gdevpdtw.c .
gdevpdti.c now installs Resources dictionary of a Type 3 font
to accumulate resources of its charproc streams.
Note that the name substream_Resources does not longer reflects
its semantics perfectly : for a charproc stream it is Resources of
the font, rather than Resources of the charproc stream
(the pdf spec doesn't define the latter).
Keeping the old name to simplify the patch.
In the old mechanizm we replace used_resources and relatives with Resources,
because those two things are similar. The goal is to simplify data structures and logics.
For doing so we implement new functions cos_dict_forall, process_resources1, process_resources2.
This appears some less effective due to searches in process_resources1, process_resources2,
but we consider the performance low important because PDF 1.1 isn't highly useful in the modern world.
Also removed the related accessor pdf_register_charproc_resource.
EXPECTED DIFFERENCES :
None.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@6169 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gdevpdti.c')
-rw-r--r-- | gs/src/gdevpdti.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gs/src/gdevpdti.c b/gs/src/gdevpdti.c index d99765a7e..064e29238 100644 --- a/gs/src/gdevpdti.c +++ b/gs/src/gdevpdti.c @@ -442,6 +442,7 @@ pdf_set_charproc_attrs(gx_device_pdf *pdev, gs_font *font, const double *pw, int } pdfont->used[ch >> 3] |= 0x80 >> (ch & 7); pdev->font3 = (pdf_resource_t *)pdfont; + pdev->substream_Resources = pdfont->u.simple.s.type3.Resources; return 0; } |