summaryrefslogtreecommitdiff
path: root/Resource
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2021-05-04 16:11:39 -0700
committerRay Johnston <ray.johnston@artifex.com>2021-05-04 16:11:39 -0700
commit2aaa240515d77b486adfd9d217c32d3cad7683f5 (patch)
treedaa475975d973a24033cd43e0ce34c250bd2012c /Resource
parent00f554cfaf1f973edf0404a3a0bfe64a1c63f631 (diff)
downloadghostpdl-2aaa240515d77b486adfd9d217c32d3cad7683f5.tar.gz
Fix rendering of file from Bug 702381.
The previous commit ec2699f50a fixed the infinite loop, but did not fix the rendering, still showing the logo multiple times along the right side instead of just lines which Adobe shows. Thanks to Peter Cherepanov for this second patch as well as the first.
Diffstat (limited to 'Resource')
-rw-r--r--Resource/Init/pdf_font.ps19
1 files changed, 15 insertions, 4 deletions
diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps
index ca93bd024..2644cb18c 100644
--- a/Resource/Init/pdf_font.ps
+++ b/Resource/Init/pdf_font.ps
@@ -1301,7 +1301,7 @@ currentdict /eexec_pdf_param_dict .undef
/Resources 1 index /Resources knownoget {
oforce
} {
- LocalResources
+ 0 dict
} ifelse def
/FontBBox 1 index /FontBBox get cvx def
/FontMatrix 1 index /FontMatrix oget def
@@ -1339,8 +1339,9 @@ currentdict /eexec_pdf_param_dict .undef
0 0 0 0 0 0
pdfopdict /d1 get exec
}{
- { //false resolvestream
- % Stack: filepos stream
+ {
+ dup //false resolvestream
+ % Stack: filepos streamdict stream
% Don't let setgcolor set the color inside the BuildGlyph
% procedure, because this causes an /undefined error.
q
@@ -1351,7 +1352,17 @@ currentdict /eexec_pdf_param_dict .undef
%% we use 'nodict'[ to store other PDF state stuff that isn't gstate, and we
%% probably always will, so it may well be more trouble than its worth.
/Dummy //false gput
- Font /Resources get exch pdfopdict
+ Font /Resources get % Stack: filepos streamdict stream resdict
+ dup length 0 eq {
+ 3 -1 roll /Resources knownoget {
+ exch pop
+ ( **** Warning: Type 3 font has resource dictionary in glyph stream.\n)
+ pdfformatwarning
+ } if
+ } {
+ 3 -1 roll pop
+ } ifelse
+ exch pdfopdict
/BuildCharDictDepth countdictstack def
.pdfruncontext
countdictstack BuildCharDictDepth sub