~ubuntu-branches/ubuntu/utopic/ghostscript/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/patches/020131023-ad3e3ed-handle-type-0-font-in-annotation.patch

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2013-11-01 15:56:33 UTC
  • Revision ID: package-import@ubuntu.com-20131101155633-0qous7h8fk76kevv
Tags: 9.10~dfsg-0ubuntu3
debian/patches/020131023-ad3e3ed-handle-type-0-font-in-annotation.patch:
Handle Type 0 font in annotation. This broke printing/displaying certain
PDF forms (Upstream bug #694734).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- a/Resource/Init/pdf_ops.ps
 
2
+++ b/Resource/Init/pdf_ops.ps
 
3
@@ -1201,7 +1201,20 @@
 
4
 /Tform {                % <MaxLen> (V) <Ff> <Q> Tform -
 
5
   clippath pathbbox 4 2 roll pop pop                        % MaxLen (V) Ff Q dx dy
 
6
   currentfont /ScaleMatrix .knownget { 3 get } { 1 } ifelse % MaxLen (V) Ff Q dx dy yy
 
7
-  currentfont /FontBBox get dup 1 get neg exch 3 get        % MaxLen (V) Ff Q dx dy yy desc asc
 
8
+
 
9
+  currentfont /FontBBox .knownget
 
10
+  not
 
11
+  {
 
12
+    currentfont dup /FontType get
 
13
+    0 eq
 
14
+    {
 
15
+     /FDepVector get 0 get /FontBBox get}
 
16
+    {
 
17
+      pop null % force an error
 
18
+    } ifelse
 
19
+  }if
 
20
+  dup 1 get neg exch 3 get        % MaxLen (V) Ff Q dx dy yy desc asc
 
21
+
 
22
   dup 0 ne { div } { pop pop 0 } ifelse                     % MaxLen (V) Ff Q dx dy yy desc/asc
 
23
   1 index mul                                               % MaxLen (V) Ff Q dx dy yy desc/asc*yy
 
24