Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > bc219369320b6b5781eed48254462cef > files > 30

ghostscript-9.25-1.2.mga6.src.rpm

From d06af15c447f821309cabb0dba5ff97ce1ea4c99 Mon Sep 17 00:00:00 2001
From: Chris Liddell <chris.liddell@artifex.com>
Date: Wed, 3 Oct 2018 14:48:48 +0100
Subject: [PATCH] Bug 699857: don't push userdict in preparation for Type 1
 fonts

Apparently, Fontographer fonts require a writable dictionary on the
dict stack. For some reason lost in mists of time, we pushed userdict for that
purpose - the problem is, that leaves any random redefinition of operators in
place when we interpret the font file.

Instead, we now push an empty, temporary dictionary for those Fontographer
fonts. As we already explicitly push systemdict (before the writable dictionary)
that ensures a consistent environment for the interpretation of Type 1 fonts.
---
 Resource/Init/gs_type1.ps | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Resource/Init/gs_type1.ps b/Resource/Init/gs_type1.ps
index efdae48..5df9fc7 100644
--- a/Resource/Init/gs_type1.ps
+++ b/Resource/Init/gs_type1.ps
@@ -166,7 +166,7 @@ ifelse
         % However, we can't use any of the other well-known dictionaries
         % (such as userdict), since the whole point of pushing systemdict
         % is to make sure that nothing important has been redefined.
-   /userdict .systemvar begin
+   32 dict begin
         % We can't just use `run', because we want to check for .PFB files.
    currentpacking
     { //false setpacking .loadfont1 //true setpacking }
-- 
2.9.1