Opened 9 years ago

Closed 9 years ago

#50475 closed defect (fixed)

ghostscript needs font handling fix for PR696554

Reported by: howarth.at.macports@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: ghostscript

Description

A font handling bug, only exposed on darwin so far, has been reported upstream...

http://bugs.ghostscript.com/show_bug.cgi?id=696554

and the followed fix found and committed upstream.

--- Resource/Init/gs_fonts.ps.orig      2016-01-29 08:29:46.000000000 -0500
+++ Resource/Init/gs_fonts.ps   2016-01-29 08:17:32.000000000 -0500
@@ -183,7 +183,7 @@
     } if
     {           % Stack: key file
                 % Protect ourselves against syntax errors here.
-      dup { token } stopped { pop //false exit } if
+      dup { token } stopped { //false exit } if
       not { //false exit } if               % end of file
       dup /eexec eq { pop //false exit } if       % reached eexec section
       dup /Subrs eq { pop //false exit } if       % Subrs without eexec
@@ -410,7 +410,7 @@
             pop
           }
           {
-            3 -1 roll pop
+            counttomark 1 add -1 roll pop
             not { dup 0 get } if  % stack: (newname) [ (name) (path) ]
             % DEBUG { (  found ) print dup print (\n) print flush } if
             % add entry to the fontmap

The attached Portfile.diff and PR696554.diff fixes this issue.

Attachments (2)

Portfile.diff (660 bytes) - added by howarth.at.macports@… 9 years ago.
Portfile diff to backport fix to Resource/Init/gs_fonts.ps for PR696554
PR696554.diff (893 bytes) - added by howarth.at.macports@… 9 years ago.
Patch with back ported fix for PR696554

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by howarth.at.macports@…

Attachment: Portfile.diff added

Portfile diff to backport fix to Resource/Init/gs_fonts.ps for PR696554

Changed 9 years ago by howarth.at.macports@…

Attachment: PR696554.diff added

Patch with back ported fix for PR696554

comment:1 Changed 9 years ago by howarth.at.macports@…

Note that the changes in PR696554.diff only exist in upstream trunk and will still need to be applied if the package is updated to the 9.18 release.

comment:2 Changed 9 years ago by howarth.at.macports@…

Upstream analyzed the origin of the bug as...

It's a dfont file, which Postscript (and thus Ghostscript) does not support.

It's possible we could add a non-standard extension to support dfonts, but a) this stuff is written in Postscript, and it is not really desirable to have platform specific stuff in Postscript, and b) I understood even Apple were shifting away from using dfont files.

So, for now, it's best just to handle the incompatibility gracefully.

comment:3 Changed 9 years ago by howarth.at.macports@…

Ping. It's been 2 months now with no action on this ticket.

comment:4 Changed 9 years ago by neverpanic (Clemens Lang)

We'll do this with #49324.

comment:5 Changed 9 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

Fixed by updating to 9.19 with r147230 in #49324.

Note: See TracTickets for help on using tickets.